I wrote stored procedure witch sometimes RAISERROR(). I execute it through the entity framework like:
using( MyModelEntities conn = new MyModelEntities() ) {
conn.MyStoredProcedure(input_p, output_p);
}
Stored procedure:
create procedure dbo.MyStoredProcedure(
@input nvarchar(255),
@output int out
)
as
begin
...
RAISERROR (N'My Exception....', 10, 1);
...
end
go
Is there any opportunity to get information about error?
In sql server exception level 1 to 10 are informational and does not raise error back to your application.
change Level in between 11 to 16 to raise error from the SP.
Can this just be put into a try/catch with the exception displayed? Or maybe you could try going into debug mode?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With