formatting exception message

  • Thread starter Thread starter Aamir Ghanchi
  • Start date Start date
A

Aamir Ghanchi

Hi,

Is there a way to format (or atleast insert line breaks) to the
exception output. In the catch block I do something like as follows,
but it does not add line break after the custom message, rather
displays <br> in the text :

catch(Exception ex){
throw new Exception("My Custom Message." +"<br />"+ ex.Message )
}

Any leads will be very appreciated.
TIA
 
Me again.
Nevermind, "\n" works instead.
Never had thought that the compiler will translate into a <br> !
I'm good to go.
 
Learned one more thing: Environment.NewLine

Me again.
Nevermind, "\n" works instead.
Never had thought that the compiler will translate into a <br> !
I'm good to go.





- Show quoted text -
 
Back
Top