[Scripting][asm] Added error handleing functions.