Use error class for exceptions, and specify types for function parameters.