exceptions and errortype