Extracting exceptions to separate module.