Report Error Detection  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Report Error Detection

Postby SBarnes » Mon Jul 26, 2021 5:31 pm

Is there a way to detect when Report Error is called on the manager i.e. when Jiwa catches an exception produced by a plugin?

What I am trying to get is the StackTrace during testing with a client.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Report Error Detection  Topic is solved

Postby Mike.Sheen » Tue Jul 27, 2021 6:16 pm

SBarnes wrote:Is there a way to detect when Report Error is called on the manager i.e. when Jiwa catches an exception produced by a plugin?

What I am trying to get is the StackTrace during testing with a client.


Jiwa.exe adds a handler for the AppDomain.CurrentDomain.UnhandledException - and that calls the Manager.ReportError (and ReportError doesn't have useful parameters - just a message string and module string - no exception object and thus no stack trace) - so I think what you really want is to have something in the UnhandledException handler to raise an event which you could hook into.

You could always put Try Catch blocks around all your plugin code and log or display it yourself.

Logged DEV-8810 to open up the unhandled exception handling to plugins.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Report Error Detection

Postby SBarnes » Tue Jul 27, 2021 6:23 pm

Mike.Sheen wrote:Jiwa.exe adds a handler for the AppDomain.CurrentDomain.UnhandledException - and that calls the Manager.ReportError (and ReportError doesn't have useful parameters - just a message string and module string - no exception object and thus no stack trace) - so I think what you really want is to have something in the UnhandledException handler to raise an event which you could hook into.

You could always put Try Catch blocks around all your plugin code and log or display it yourself.

Logged DEV-8810 to open up the unhandled exception handling to plugins.


Yeah I tried an unhandled exception handler and it didn't work as I believe one in Jiwa clears the error and first chance exception gives you more messages than are necessary.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Report Error Detection

Postby Mike.Sheen » Tue Jul 27, 2021 6:37 pm

SBarnes wrote:Yeah I tried an unhandled exception handler and it didn't work as I believe one in Jiwa clears the error


No - we don't clear it - but I would hazard a guess that by merely handling it, it's no longer considered unhandled and so anyone else won't get the event?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest