Errors are first class citizens

This builds on the following intros:

Script

Here is a hello-world content, and that’s the code that generated it.

Let’s break this code by calling a function that doesn’t exist.

nooooooooo()

Obiously, we will get an error, but let’s note a couple of things here.

  • The broken content did not bring down the entire page.
  • The statusCode of the response does indicate the error nevertheless.
  • The content still behaves like a regular content. For example, you can move it to another page or delete it.
  • Also, it’s very easy to locate the bug, and thus to debug it.
  • Because errors are first class citizens, testing Boomla applications also becomes extremely easy.

Catching this is error is only possibly because all Boomla apps are run in lightweight isolated environments.