Catch errors throw in synchronous execution