HighTechTalks DotNet Forums  

formatting exception message

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss formatting exception message in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Aamir Ghanchi
 
Posts: n/a

Default formatting exception message - 12-13-2007 , 02:49 PM






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

Reply With Quote
  #2  
Old   
Aamir Ghanchi
 
Posts: n/a

Default Re: formatting exception message - 12-13-2007 , 03:20 PM






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

On Dec 13, 1:49 pm, Aamir Ghanchi <aamirghan... (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #3  
Old   
Aamir Ghanchi
 
Posts: n/a

Default Re: formatting exception message - 12-13-2007 , 03:40 PM



Learned one more thing: Environment.NewLine

On Dec 13, 2:20 pm, Aamir Ghanchi <aamirghan... (AT) gmail (DOT) com> wrote:
Quote:
Me again.
Nevermind, "\n" works instead.
Never had thought that the compiler will translate into a <br> !
I'm good to go.

On Dec 13, 1:49 pm, Aamir Ghanchi <aamirghan... (AT) gmail (DOT) com> wrote:



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- Hide quoted text -

- Show quoted text -


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.