Many programming languages use the try-and-catch construct to handle runtime errors gracefully. If the code within the try block encounters an error, it will throw an exception to the catch block, where the error handling occurs. Today we will dive into the ObjectScript implementation of this construct and discuss some ways to clean things up.
ObjectScript Implementation Basics
To get started, we will first look at the basic structure of the try/catch block:
try{
//some code here
}
catch ex{
//some error handling here
}

