Hi,

This set of patches will add 'better' error/exceptions reporting. I tried to 
make this
thing very simple and avoid voodoo we had in 'catched_exceptions' list.

No you can use simple DSL (like features) to catching and describing exceptions 
from
our beloved 'safely' blocks.

Example usage:

exceptions do

  on /AuthFailure/ do
    status 401 # Authentication failed...
  end

  on /No offering found/ do
    status 400  # Wrong combination of hardware_profile / image
  end

  on /CloudServers::Exception::(\w+)/ do
    status 502  # Provider error
  end

  on /Error/
    status 500
    message "Hello, this is a nice message to client."
    exception CustomException
  end

end

Let me know what do you think. All ideas how to improve it are welcome.

  -- Michal

Reply via email to