Chapter 3: Error Handling in Activerse

In this chapter, you'll learn how Activerse handles errors, the different types of errors in Java, and how the Activerse Concurrent Error Handling System (ACEHS) works to make debugging easier and more efficient.

The Basics of Errors

Let's first review the different types of errors in Java:

How does Activerse handle errors?

Activerse uses its custom error handling protocol to report what's happening. This is more efficient than classic Java stack traces because it can help localize errors and prevent the code from crashing on a simple error. This error protocol is known as ACEHS.

ACEHS: Activerse Concurrent Error Handling System

The ultimate goal of ACEHS is:

Denotations

File name extensions (A: Engine, B: Utils):

Keywords that may be helpful:

Example Error

Let's take an error (without the provided stack trace) and debug it:


5A.OUT-CONNTO-2A.OUT:(LN: paint(Graphics g) - ACEHS Error thrown; image is null. Please check the image path and try again.

    

This error comes from the Actor.java engine class inside the paint() method. The most important part is seeing the error message before anything else. ACEHS is reporting the image has been identified as null (blank, unpresent, etc) and is asking us to check the image path once again. Make sure you check the image paths and use reference paths as well.

5A.OUT shows the error is coming from the class 5A (Actor), but this error may correlate with the class (CONNTO) 2A (ActiverseImage.java). If you've already debugged via the method above, the next thing is to check these files and debug properly. LN: points to the method (paint()) where the error was reported.

Final Notes

ACEHS helps you quickly identify and resolve errors in Activerse projects. Always read the error message, check the referenced files and methods, and use the denotations to trace the source of the problem.