Better custom error handling.