Help !! Help !! Exception handling

Shamal3001

Well-known member
  • Sep 22, 2021
    6,629
    11,216
    113
    Exception handling කියන්නේ Alert Messages දාලා Handle කරන එකටද? නැත්නම් Programme errors Separate Exception handlers දාලා Handle කරන එකටද?

    Coding ටිකක් දන්න කෙනෙක් ඉන්නවනම් Help කරන්ට
     
    Last edited:

    tharakaf

    Well-known member
  • Oct 19, 2020
    34,996
    71,290
    113
    Exception handling කියන්නේ Alert Messages දාලා Handle කරන එකටද? නැත්නම් Programme errors Separate Exception handlers දාලා Handle කරන එකටද?

    Coding ටිකක් දන්න කෙනෙක් ඉන්නවනම් Help කරන්ට
    Danna coding labbak ne, eth Uni kaaley igena gatha ekey hatiyata exception ekak aawama clean widiyata exit wenna hadana ekata tama mama hitanne exception handling kiyanne :unsure: . Umbata okkoma exception onam eka error ekak deela exit karanna puluwan nathan separate errors deela exit karanna puluwan. Dewani widiya hondai mokada etakota une mokakda kiyala terenawa.
     
    • Like
    Reactions: ThisaraMalintha

    kingcharith

    Well-known member
  • Aug 18, 2018
    611
    681
    93
    Exception handling kiyanne code eke intended/ non intended errors and/or paths handle karana ekata. Hama welawema specific exception mulinma handle karala anthimata generic eka use karanna. Single try multiple catch. Hoda logging/output modal ekak use karanna
     

    ThisaraMalintha

    Well-known member
  • Nov 16, 2015
    8,612
    7,331
    113
    ගෙදර
    Exception handling kiyanne code eke intended/ non intended errors and/or paths handle karana ekata. Hama welawema specific exception mulinma handle karala anthimata generic eka use karanna. Single try multiple catch. Hoda logging/output modal ekak use karanna
    this.

    bubble up the exception to the top of the call stack as much as possible. log the errors and convert it into a user-friendly error (without leaking any implementation details of the system).
    be careful when logging PII or some other sensitive info. study any standards that you must adhere to depending on the domain of the system