(test) Added test for generic error handling.