Red Gate forums :: View topic - Automatically logging errors and terminating applications
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Automatically logging errors and terminating applications

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jdh



Joined: 11 Oct 2013
Posts: 3

PostPosted: Fri Oct 11, 2013 2:37 pm    Post subject: Automatically logging errors and terminating applications Reply with quote

I have a customer-facing application that needs to alert me when an error/exception occurs, and then terminate itself.

I've been able to log errors via the Error Reporting feature of Smart Assembly, but I've not found a way to automatically log the error (without the error reporting window coming up, requiring user interaction) and terminate the application. Is this possible?
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 547

PostPosted: Mon Oct 14, 2013 12:28 pm    Post subject: Reply with quote

So the requirement is:

- non-interactive mechanism of trapping and sending report for all unhandled exceptions and then terminating application?


Out of the box you do get a - non-interactive mechanism of trapping and sending report for all unhandled exceptions (its the error report template: 'Without UI') but I couldn't guarantee it always terminates.

For that I would recommend using the SDK so you can adapt the given templates with more specific code. The SDK comes with the professional edition.
Back to top
View user's profile Send private message
jdh



Joined: 11 Oct 2013
Posts: 3

PostPosted: Mon Oct 14, 2013 2:55 pm    Post subject: Reply with quote

Yeah, that's the route I'm currently exploring.

I believe I can get what I want. I'll be sure to post back here when I find a working solution.
Back to top
View user's profile Send private message
jdh



Joined: 11 Oct 2013
Posts: 3

PostPosted: Mon Oct 14, 2013 5:20 pm    Post subject: Reply with quote

Thanks Chris.Allen, you got me on the right track by mentioning the 'Without UI' module. Not sure how I didn't see it.

I documented my quick solution on StackOverflow: http://stackoverflow.com/questions/19319997/automatically-log-error-and-terminate-application-with-smartassembly
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group