c# - Error Message but still debugging -


i don't have code this.my problem when input text have error program not responding anymore , need close program , edit code.what want when there error there message part of code error , no need me close program.

thank you.

what need capture execption try-catch block , either save error log or display on screen

class program {     static void main(string[] args)     {         try         {             throw new exception("oops, somthing bad happened!"); //this line 17         }         catch (exception ex)         {             messagebox.show(ex.tostring());             //throw; //if don't have code continue executing after point.         }     } } 

when program run following message box shown

 ---------------------------  --------------------------- system.exception: oops, somthing bad happened!     @ sandbox_console.program.main(string[] args) in c:\sandbox console\program.cs:line 17 --------------------------- ok    --------------------------- 

see how shows on line 17 error happened, can save information log file later reading.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -