New exception handler

Added custom pseudo exception handler to short code.