Notifications
Announcements
No record found.
Hello,
I have try + catch block.
The catch should be empty - what is the best practice way doing that?
try {
// my code ...
} catch {
// do nothing.
}
Thanks :)
*This post is locked for comments
Well having an empty catch statement wouldn't be best practice, but if you're going to do it then
try
{
// do something
catch
{}
Well - this is not best practice.
I know that there is a way putting something instead of {} - I just forgot that ...
What shall I put instead of catch {} ?
The best practice is to call exceptionTextFallThrough() in the catch block -- and of course document the reason why nothing is done.
Hi, I'm currently migrating to X++ language from other .net PL. I'm kinda curious if the "finally" block is also available in X++. Is it? Thanks!
Hi POPCOLA,
There is no finally statement in X++.
Please review following link
msdn.microsoft.com/.../aa893385.aspx
Please verify, and let us know your findings
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2