| Author: Ritesh N. Jain 29 Aug 2008 | Member Level: Gold | Rating: Points: 3 |
use Try Catch Block to capture all type of error.
try
'your code here.
catch exc as exception 'Here you can see error message and it's source using exc.InnerException or simply exc.Message to know about error End Try
|
| Author: sudheshna 29 Aug 2008 | Member Level: Bronze | Rating: Points: 3 |
ok. as you said i have done that,...but here i will get the message from oracle for ex:-ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at line 1 ....instead of this i want to display user freindly message.
|
| Author: Ritesh N. Jain 29 Aug 2008 | Member Level: Gold | Rating: Points: 4 |
Very first thing if you know that Parameter suppose to be Number than you have to validate that at UI level it self before passing into Database Tier,and secondly you can show your own message in Catch block e.g
try 'Your saving code catch exc as exception labMessage.Text = "Unable to save the records,please input proper value" end try
|
| Author: sudheshna 29 Aug 2008 | Member Level: Bronze | Rating: Points: 5 |
ok. i have some other question. if your are interested please answer me. it is regarding xsl and xml. i want to chk in xsl if xml file missing then i have to catch and diplay some message. no dot net here...it is only xsl and xml. for ex <xsl: variable name="doc1" value="xml1.xml">...this will work if xml file exists...if there is no xml file then it will raise an error which i have to handle....if you this please let me know. thanks in advance.
|