I call stored function from my php code. The problem is that I don't know how to detect whether an error occured during its execution. mysqli_stmt->execute() returns TRUE despite errors inside my stored function. I declared handlers for certain errors' codes but how can I catch all other errors?