Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Try-Catch on internal class

Posted on by Microsoft Employee

Hi everyone,

I need to catch an error witch is thown by an internal class

try

{

...

_COM.send();         <--internal class, i can not step into

}

catch

{

      //throw error...

}

Depends of the type of error the try-catch works or not. My problem is that i need to capture the error without stop the code (it is in a loop). I don't know how to do this. the try-catch it's not working so I can't handle it. 

Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Try-Catch on internal class

    Hi Sukrut,

    Thanks for you replie.

    The Try catch is inside a method that is called in the loop and all of this is inside an outer transaction. I try put my try catch ostuside and it works

    The problem is that i need the transaction continues to the next record if error appears, and if the try catch is outside the loop i dont know how I'm going to get it. But its code design problem.

    Thansk again.

  • Verified answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,647 Moderator on at
    RE: Try-Catch on internal class

    If you have loop running try putting your try catch inside your loop. Also make sure you don't have any outer transaction.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans