catch and rethrow errors
Posted: Mon Oct 22, 2018 9:58 am
I want to have a generic catch method capture all events:
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<throw event="blah" message="hello, world!"/>
</block>
</form>
<catch>
<prompt>
I'm sorry. We caught an error.
// do transfer
</prompt>
</catch>
</vxml>
I then want to do a transfer to a number we have, then re-raise the error so it appears in the logs. Can I do this?
Is there a list of all events that can be raised? If I have to do this manually to re-raise I probably need a full list.
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<throw event="blah" message="hello, world!"/>
</block>
</form>
<catch>
<prompt>
I'm sorry. We caught an error.
// do transfer
</prompt>
</catch>
</vxml>
I then want to do a transfer to a number we have, then re-raise the error so it appears in the logs. Can I do this?
Is there a list of all events that can be raised? If I have to do this manually to re-raise I probably need a full list.