we can do:
```
module Targetprocess
  class APIError < StandardError
    class BadRequest < APIError; end
    def parse(xml)
      # get msg here
      ("Targetprocess::APIError::#{status}".safe_constantize || self).new(msg)
    end
  end
end
```
it allow us to do:
```
e = Targetprocess::APIError::BadRequest.new
begin
  raise e
rescue Targetprocess::APIError => e
  puts e.inspect
end
```