Errors are now handled with exceptions in the driver, as sugested.