Error handling functions

You can use this function in evaluating the type of error during map execution.