error catcher for microscopy canvas