Better exception handling.

QUO routines now throw QUOExceptions in error paths.