Use exceptions that implement ExceptionInterface

Throwing exceptions that implement the ExceptionInterface allow
for exception catching and error reporting.