The keyboard hook now throws an exception in en event of an error.