Return Errormessage string on catch and handle that message at function

Return Errormessage string on catch and handle that message at function