Created
July 4, 2024 20:05
-
-
Save BryceStevenWilley/583bb3d0584981fea0932916fa2f93f6 to your computer and use it in GitHub Desktop.
DA can't catch exceptions across blocks, example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| metadata: | |
| title: Default playground interview | |
| short title: Test | |
| --- | |
| objects: | |
| - client: Individual | |
| --- | |
| mandatory: True | |
| code: | | |
| try: | |
| benefits | |
| except RuntimeError: | |
| benefits = "idk" | |
| all_done | |
| --- | |
| question: | | |
| What is your name? | |
| fields: | |
| - First Name: client.name.first | |
| - Middle Name: client.name.middle | |
| required: False | |
| - Last Name: client.name.last | |
| --- | |
| question: | | |
| What is your date of birth? | |
| fields: | |
| - Date of Birth: client.birthdate | |
| datatype: date | |
| --- | |
| event: all_done | |
| question: | | |
| Here is your document, ${ client }. | |
| subquestion: | | |
| You will need this. | |
| attachments: | |
| - name: Information Sheet | |
| filename: info_sheet | |
| content: | | |
| Your name is ${ client }. | |
| % if client.age_in_years() > 60: | |
| You are a senior. | |
| % endif | |
| You are eligible for ${ benefits }. | |
| --- | |
| code: | | |
| if client.age_in_years() < 18: | |
| benefits = "CHIP" | |
| raise RuntimeError("hi") | |
| else: | |
| benefits = "Medicaid" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment