Q:

Handling Object Does Not Exist Error in TestComlete with Javascript

I am trying to incorporate into my Automation scripts functionality that will prevent the whole script from stopping when an Object Does Not Exist Error for a web object occurs.  Instead the script should catch the error and perform a different function and continue running other scripts. 
I first tried a Try Catch block, but then I learned it cannot see the errors generated by TestComplete itself.  I looked into the Event Handlers you can make via the tool as well, but they don't seem to make any sense for the solution I need.  
Here is an example and what I am trying to do. 
function TestPage() {
\\Some condition where it will only continue if no errors are raised

   var testobj = Aliases. MappedName
   testobj. Click

   //more code

//goes here if an error occurs at any point
//executes a reset function. 

A:

I can suggest two possible approaches that can be used separately or together. 

You can check an object for existence before trying to get it.  When working with the Name Mapping tree, this can be done with help of the WaitAliasChild and WaitMappedChild methods.  This method is the best if you know that an object can be missing at a specific test step. 
You can handle the OnLogError event in order to handle errors you want.  Using this handler, you can prevent the error from being posted to the test log.  Also, you can disable the Stop on error project option to prevent TestComplete from stopping the test on error and stops execution from within the OnLogError event handler using the Runner. Stop method.  This approach works if you do not know at which exactly test step the issue can occur. 

Personally I prefer the first approach and treat the second situation as an issue in my test or the tested application.