Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Re-raising errors in TRY/CATCH

SQL 2005. Is there any way to re-raise a system error that occurs within a
TRY block as the system error? Within the CATCH block I can identify the
error number via the ERROR_NUMBER() function and I can include that number
within the error message when I re-raise the error, but client code then has
to parse the text to identify the specific error - not a good idea. I can
explicitly re-raise a user defined error (> 50,000), but I can't re-raise a
system error (e.g., 547, FK violation). Any solution?

Vern Rabe

Have you considered using the return value?


begin try
  ..manipulate data
end try
begin catch
  ... do error-handling
  return error_number()
end catch



Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc