In Business Central as from version 20, which is 2022 Wave 1, when you develop a report without a layout and try to run it, like this one:
Tag Archives: Error
Catching errors with the oldest trick in the book
Sometimes, it’s good to remember the old tricks while we’re showered in new fancy stuff. This video is about catching errors and how to do that without TryFunction or collectable errors, check it out:
Tip: Get Current Callstack with a Collectible Error
You may be tempted to have your code respond differently depending on the context in which it has been called and read the callstack for that purpose. That’s not a train you want to ride though. I’ve tried, it stops at some pretty weird stations.
Part 4: (Slightly) More Elegant Error Handling in Business Central
In part 3 we had a look at the new platform feature, collectible errors. Long story short: it makes scenarios where you want to collect and display multiple errors together (e.g. checking journal lines) much easier to code and read, no messing around with if Codeunit.Run then, read the post if you’re interested.
ErrorInfo data type & Collectible Errors
A major change to AL Language development is here! Collectible errors can hugely improve any validation procedures. And what’s new? Everything is about a new data type ErrorInfo.