Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Raiserror question
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01477486
Message ID:
01477501
Views:
28
>>>>>>Hi All, I'm playing around with Raiserror() and would like to display my own error message without all the other stuff i.e. sp name, line number etc..., is this possible ?
>>>>>
>>>>>You have to supply to the RAISERROR statement at least 3 parameters
>>>>>
>>>>>--RAISERROR (<message>, <severity>,<state>)
>>>>>RAISERROR ('My Message', 10,1)
>>>>>
>>>>
>>>>Hi Sergey, that is exactly what I'm doing and see a MessageBox with five lines of information - Index #0 - 'The error' - LineNumber: 12 - Source: >NET.SqlClient Data Provider - Procedure: MySP. What I would like, is , to just see the message text without all the other stuff
>>>
>>>That sounds as if you aren't catching the error in .NET - i.e. you're looking at the .NET exception that flows from it.....
>>
>>Hi Viv, I have a try catch(SqlException e) but this doesn't trap it - should I try a different Exception type ?
>
>TBH, from the top of my head, I don't know - why not, for now, just catch the general exception and see what type is turns out to be......

Hi Viv, sorry my bad, the error was being caught in a nested try catch in the bowels of my data class which produces the info I was seeing ? doh !!! sorry to waste your time.
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform