Other Error Handling Considerations

Other Error Handling Considerations

Use ajel with unsafe code

ajel (and try catch) should be utilized when dealing with code that utilizes throw.

It is used as a way to capture the unknown return which is not denoted by the return-type.

Consider not using ajel with internal code (not throwing)

Most applications do not need to throw.

When maintaining your own app, consider returning instead. You can return an error if you need a stack trace, or return a string with an error name or code - ie ERR103-FileNotFound.