473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

formatting exception message

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 <brin the text :

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

Any leads will be very appreciated.
TIA
Dec 13 '07 #1
2 1242
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...@gmail.comwrote:
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 <brin the text :

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

}

Any leads will be very appreciated.
TIA
Dec 13 '07 #2
Learned one more thing: Environment.NewLine

On Dec 13, 2:20 pm, Aamir Ghanchi <aamirghan...@gmail.comwrote:
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...@gmail.comwrote:
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 <brin 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 -
Dec 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jan Decaluwe | last post by:
Hi: There is a difference between exception info formatting by the interpreter versus the traceback module. For example, say we define an exception Error in file module.py: $ python Python...
8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
1
by: Serge calderara | last post by:
Dear all, I am using the Tracing possibility in order to log errors or user message in a log file. Depending on the error return, especially for exception, message can be difficult to find...
2
by: vector | last post by:
Here is a function more or less exactly as I found it from somewhere on the internet. static string BeautifyXML(string sXML) { string result = ""; System.IO.MemoryStream ms = new...
1
by: calvinX | last post by:
Hi Everyone, I am having a problem with sending an email from a VB.NET application. I can send an email automatically from my application (without seeing it) but I want to load the data into my...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
93
by: Phlip | last post by:
C++ers: Feast your eyes: void Home:: inherits (IdentifierPtr const& id) { ... }
14
by: Scott M. | last post by:
Ok, this is driving me nuts... I am using VS.NET 2003 and trying to take an item out of a row in a loosely-typed dataset and place it in a label as a currency. As it is now, I am getting my...
7
by: Mike | last post by:
I want to suppress blank lines in an address on a web page. At the moment, I am displaying the data like this: <asp:Label ID="Address1Label" runat="server" Text='<%#...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.