1. A system for handling errors during execution of programs, the system comprising: an error handling module comprising computing hardware configured to execute specific instructions, the error handling module configured to: associate a callback to a catch block with a try block of a program routine, wherein the try block comprises one or more program instructions, and wherein the catch block comprises one or more error handling instructions; determine one or more relationships between the program routine and one or more secondary routines, wherein each of the one or more relationships is one of a sibling relationship or an ancestor-descendant relationship, the program routine and the one or more secondary routines configured to execute asynchronously; receive a program exception thrown by a secondary routine of the one or more secondary routines, wherein the secondary routine is within a chain of calls initiated by the one or more program instructions of the try block, and wherein the exception is received after the program routine has finished execution; and in response to receiving the program exception: cancel any of the one or more secondary routines determined to be a descendant of the program routine, wherein cancelling comprises cancelling execution of any of the one or more secondary routines scheduled for execution and terminating execution of any of the one or more secondary routines executing; and execute the callback to the catch block.