catching exceptions decorator