Skip to content

Support arguments of exceptions to be risen

Compare
Choose a tag to compare
@nepalez nepalez released this 08 Mar 20:46
· 10 commits to master since this release
---
- class: API
  chain: get_product
  arguments:
    - 1
  actions:
    - raise: API::NotFoundError
      arguments:
        - "Cannot find product by id: 1"

This would raise the following exception instance:

API::NotFoundError.new("Cannot find product by id: 1")