What happens if you throw an error?

What is the recommended way to handle errors from the plugin?

try/catch is your friend, just like on any other regular websites (plugins are websites).