NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

database error handling

Hello, 

I'm using Stored Procedure schema in order to record test results to my MS SQL server database and everything works OK. My stored procedures, are using RAISERROR to send  an error message, in case of some exception occurred. The question is ...Is it possible to catch such messages in TestStand ? 

Thanks

0 Kudos
Message 1 of 5
(3,097 Views)

Hi airspan,

 

Are you looking for something like this: https://www.ni.com/docs/en-US/bundle/teststand/page/override-sfps-runtime-error.html

 

This shows how to use the SequenceFilePostStepRuntimeError Engine callback to handle errors.

0 Kudos
Message 2 of 5
(3,074 Views)

Yes, I have implemented the custom SequenceFilePostStepRuntimeError callback. It works OK if an error raised from some step in my sequence.

But unfortunately it cannot catch RAISERROR messages coming from SQL stored procedures...

0 Kudos
Message 3 of 5
(3,047 Views)

Is that a custom error the database creates and throws from inside of it?

Chase
NI Technical Support Engineer
0 Kudos
Message 4 of 5
(3,030 Views)

Yes, this a custom error which throws from SQL stored procedure. Actually, I've  discovered that LogToDatabase callback handles such messages and my next challenge is how to redirect them to my GUI...

0 Kudos
Message 5 of 5
(3,021 Views)