<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Error Handling on Stefan Maron | Business Central &amp; AL Development</title><link>https://stefanmaron.com/tags/error-handling/</link><description>Recent content in Error Handling on Stefan Maron | Business Central &amp; AL Development</description><generator>Hugo -- gohugo.io</generator><language/><lastBuildDate>Wed, 10 Jul 2024 09:00:00 +0100</lastBuildDate><atom:link href="https://stefanmaron.com/tags/error-handling/index.xml" rel="self" type="application/rss+xml"/><item><title>BCv24 Error Info Wrapper - Backporting the Fluent ErrorInfo API</title><link>https://stefanmaron.com/posts/bcv24-error-info-wrapper/</link><pubDate>Wed, 10 Jul 2024 09:00:00 +0100</pubDate><guid>https://stefanmaron.com/posts/bcv24-error-info-wrapper/</guid><description>On a recent stream I built a fluent wrapper around the ErrorInfo data type that lets you chain calls like ErrorInfoWrapper.Title('...').Message('...').AddAction(...). The original implementation used the this keyword, which is only available from AL runtime 14.0 (Business Central v25) onwards. Someone in the chat — I think it was Natalie — pointed out that it would only work on v25+. I was pretty sure we could make it work on v24 too, so that&amp;rsquo;s what this stream was about.</description></item><item><title>Creating the ErrorInfo Wrapper</title><link>https://stefanmaron.com/posts/creating-the-errorinfo-wrapper/</link><pubDate>Fri, 05 Jul 2024 09:00:00 +0100</pubDate><guid>https://stefanmaron.com/posts/creating-the-errorinfo-wrapper/</guid><description>In this stream I built something I&amp;rsquo;ve been meaning to do for a while: a wrapper codeunit around the ErrorInfo type in AL. If you&amp;rsquo;ve ever tried to use ErrorInfo properly — with custom dimensions, navigation actions, fix-it actions — you know how much boilerplate it takes. I wanted to fix that.
The full stream is on YouTube if you want to follow along. The repo is at github.com/StefanMaron/ErrorInfoWrapper .</description></item><item><title>Build a better way to catch errors 2 – without the test framework</title><link>https://stefanmaron.com/posts/build-better-error-catching-without-test-framework/</link><pubDate>Thu, 30 May 2024 09:00:00 +0100</pubDate><guid>https://stefanmaron.com/posts/build-better-error-catching-without-test-framework/</guid><description>In the first stream on this topic I built a way to reliably catch and log errors during Business Central imports using the test framework — running code inside a test codeunit so that any database changes roll back automatically when an error is thrown. The idea worked. But then I tried to run it in production Online, and it blew up immediately: the test framework is not available in production SaaS tenants.</description></item><item><title>Build a better way to catch errors (Part 1) - The BC Coding Stream</title><link>https://stefanmaron.com/posts/build-better-error-catching-part-1/</link><pubDate>Tue, 28 May 2024 09:00:00 +0100</pubDate><guid>https://stefanmaron.com/posts/build-better-error-catching-part-1/</guid><description>This stream started as a debugging session. I&amp;rsquo;d hit a problem in a real project: I needed to catch errors from field validations — including all the hidden commits that Validate can trigger — without leaving any trace in the database. I wanted to show the user what would go wrong before actually doing the thing. Turns out that&amp;rsquo;s harder than it sounds.
You can watch the full stream on YouTube .</description></item></channel></rss>