detect the error code during Canvas sis call; break and stop following function calls if error is met.

exit the function with exit instead of abort