exception handling in conformance with the specs