In my x++ code I have the following
void run() {
try
{
startLengthyOperation();
this.readFile();
}
catch (Exception::Deadlock)
{
retry;
}
catch (Exception::Error)
{
error(strfmt("An error occured while trying to read the file %1", filename));
}
catch
{
error("An unkown error has occured");
}
endLengthyOperation();
}
I am hitting the final catch (prior, I was getting no message about exceptions). But I want to know what is REALLY happening and causing the exception. How can I find out what the exception is?
You could add stackTrace to the info log and add an info message when you get to the last catch. That would show you exactly what the code was doing at the time it reached the catch.
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