A .Net automation - exception pass-through

xoxo Member Posts: 34
The automation is a POP3/SMTP mailcomponent that just sends and receives mails. I've safeguarded all entrypoints from Navision by catching Exception at the top-level of every called method, and I'm using "using", to ensure disposing resources. Also a try-catch guarded destructor that disposes a socket is there.

But now the curious thing. The mail component has a class with two private methods - these two methods are the only ones that are not guarded by try-catch - as they aren't supposed to be called from Navision. But still, I've found out that in these two methods is the only place where the exception I'm getting is thrown that shows up in Navision. I can't explain why that is.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from Navision Tips & Tricks forum to Navision forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • xoxo Member Posts: 34
    Thanks for moving it.

    Follow up. It turns out that the error was in fact just Exception.Message mirrored via ERROR in Navision so it looked like the exception passed through when in reality it was just a logged exception. Sorry about that.

    Nothing more to see.
Sign In or Register to comment.