Closed hangingman closed 5 years ago
Including the error output would be helpful in the future. The error message is saying that a comment is not valid at that location. If you read the DSL definition for the Lambda state it says that you need a State, not a comment in the catch block.
File "issue.hsd", line 11
"""check_something"""
^
Syntax Error: Invalid syntax
Currently Heaviside doesn't support arbitrary state transitions (even though AWS Step Functions do). I've tried to create the most common control flow statements in the Heaviside DSL so that files written in the DSL are easier to follow and to shy away from goto
style programming.
If your control flow needs are not satisfied by the existing statements something new could be added (either a new control flow structure or just added goto
support).
@derek-pryor Hi, thank you for your explanation !
I expected the """xxx"""
represent the kind of label
on the general programming language.
And, I was suffered from lack of function(state transition). But, it seems heaviside's policy.
My question would be useful for the people of later.
The """xxx"""
does label / name the state (instead of the state being called LineXX
), but cannot be used to create a transition. I am starting to plan for another release of Heaviside and may include a new control flow or goto
ability.
I just created PR #11 that adds this support. I'll be creating the next Heaviside release in a bit after I add some other improvements.
@hangingman Heaviside 2.0 was just pushed to PyPi and contains this fix
Hi,
I would like to catch Errors on Lambda, then jump to the another previous State. I tried following DSL:
But, it causes error. Is there any suggestion ?