New console v1.3 release

I am happy to announce the release of console v1.3! As I already hinted in my previous blog post, Ottmar and I have been busy adding a thorough test suite to the project. That has been the main focus behind the scenes, but I also want to highlight a few additional changes that made it into this release. In case you haven’t heard of console yet, check out Ottmar’s introduction to logging that doesn’t get in your way.

As an aside, around 90% of the newly integrated test suite was generated with AI. I am probably the only one still surprised by this in 2026, but it was not too long ago that I would have considered this impossible, or at least more work than simply writing the tests by hand. AI coding tools really have come a long way, and I am excited to see how much more they can assist us. Needless to say, we reviewed every commit thoroughly, especially the ones touching existing code, and made sure that console remains just as robust as before.

But now, let’s dive into the changes!

Breaking Change: assert fails on null

When I started implementing the tests for the assert function, I noticed that the AI assistant assumed it should fail when the input is null. Ottmar and I discussed this and agreed that this behavior makes sense. If you use assert in your code, make sure you understand the implications. We had to adjust one internal assert call to match this new behavior.

Before we wanted to avoid trying to insert more than 4000 bytes into a database column with this assert:

-- ...
assert(lengthb(p_prefs) <= 4000, 'Sorry, we cannot save your client preferencs - seems you have too many session in debug mode.');
-- ...

This seems reasonable, but what if the variable is null? Obviously, its length is null as well and null <= 4000 is, again, null. Before our breaking change, this passed just fine. After the change, we needed to handle the null-case explicitly to avoid getting -20777-errors constantly:

-- ...
assert (
      coalesce(lengthb(p_prefs), 0) <= 4000,
      'Sorry, we cannot save your client preferencs - seems you have too many session in debug mode.' );
-- ...

A very small but important change.

If you are using console.assert be mindful of this change when you upgrade!

Unit Tests

As I already mentioned, we added a lot of unit tests, and we are probably still missing plenty. Still, the new suite gives us much more confidence when extending console in the future without breaking existing functionality.

join now works as expected

Another bug the unit tests caught was in join: it included the separator at the beginning of the result as well.

declare
    l_tab console.t_vc2_tab_i;
begin
    l_tab(1) := 'apple';
    l_tab(2) := 'banana';
    l_tab(3) := 'cherry';

    console.print(console.join(l_tab, ','));
end;

-- Output v1.2: ,apple,banana,cherry

In version 1.3, the separator is no longer added at the beginning of the string. The output of the above example is now apple,banana,cherry, which is of course what we expect from a join function.

Public exception for assert

We have now made the exception console.e_assert_error public. This is the exception thrown by console.assert when the input is false. Previously, it was only exposed as a private package constant, so you had to hard-code -20777 if you wanted to handle it properly. Now you can do it like this:

begin
    console.assert(1 > 2, 'Test message');
exception
    when console.e_assert_error then
        -- do your thing
end;

Stay tuned!

You can install the new version by simply running

@https://raw.githubusercontent.com/ogobrecht/console/main/install/create_console_objects.sql

in SQLcl and you’re good to go. Let us know what you think!

In the meantime, we will continue to harden the test suite and introduce more features to make console even more useful!