Activity overview
Latest activity by fostandy
Ok, in my usercode i have this public void Foo()
{
// here I would like to throw an exception and continue
throw new Exception("I want this to report, but continue");
}
public void Foo2()
{
throw new Exception("I want this to report, and not continue");
}
public class UnhandledExceptionHandlerWithoutUI : UnhandledExceptionHandler
{
protected override void OnReportException(ReportExceptionEventArgs e)
{
// handle/report it
if (/* WHAT GOES HERE? */)
e.TryToContinue = false;
else
e.TryToContinue = true;
}
}
My question is, what goes into the /* WHAT GOES HERE? */ that will make calls to Foo() and Foo2() behave as I desire? / comments
Ok, in my usercode i have thispublic void Foo()
{
// here I would like to throw an exception and continue
throw new Exception("I want this to report, but continue");
...
I want to report the exception, and then continue.
I don't see how I can report the exception without re-throwing it for SmartAssembly to handle via the OnReportException method. And once rethrown I don't see any way to control the continue parameters short of wrapping it in a customized exception. / comments
I want to report the exception, and then continue.
I don't see how I can report the exception without re-throwing it for SmartAssembly to handle via the OnReportException method. And once rethrown ...
actually I can't - no way to actually send an exception report from outside of the OnReportException handler.
Brian: My question was basically what should I put in my catch (Exception e) {} block to be able to set ReportExceptionEventArgs#TryToContinue = true; ?
I'm not seeing an immediate way to deal with this except either with static variables or wrapping the exception. The latter is the cleanest solution I can think of but it is still not particularly elegant.
This is more of a design question than a technical smartassembly question, although I do want to make sure I'm not missing something obvious in the API. / comments
actually I can't - no way to actually send an exception report from outside of the OnReportException handler.
Brian: My question was basically what should I put in my catch (Exception e) {} block t...
I realised I was thinking about this in completely the wrong way. Whatever code I had in my OnReportException(ReportExceptionEventArgs e) handler is what I should be putting into my catch brace - thanks. / comments
I realised I was thinking about this in completely the wrong way. Whatever code I had in my OnReportException(ReportExceptionEventArgs e) handler is what I should be putting into my catch brace - t...
Pattern for reporting exception and continuing
There are some circumstances when we want to catch an exception and do some other handling before dispatching it to our custom handler (which brings up a custom form and sends the report).
In addit...
Thanks James, I had been looking in Program Files. / comments
Thanks James, I had been looking in Program Files.
Where to manage smartassembly dependency search paths?
Hi,
Having just been badly burned by smartassembly finding and using some old dependency's for my project, I am now trying to understand how to control where smartassembly searches for these.
The o...