formatting exception message

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
 
A

Aamir Ghanchi

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

Aamir Ghanchi

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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top