You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/platform/actors/development/programming_interface/basic_commands.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,9 +297,9 @@ async def main():
297
297
298
298
The SDK provides convenient methods for exiting Actors:
299
299
300
-
1. Use `exit()` with custom messages to inform users about the Actor's achievements or issues.
301
-
302
-
2. The `exit()` method emits `exit` event allowing components to perform cleanup or state persistence.
300
+
- Use `exit()` with custom messages to inform users about the Actor's achievements or issues.
301
+
- Use `fail()` as a shortcut for `exit()` when indicating an error. It defaults to an exit code of `1` and emits the `exit` event, allowing components to perform cleanup or state persistence.
302
+
- The `exit()` method also emits the `exit` event, enabling cleanup or state persistence.
303
303
304
304
Example of a failed exit using a shorthand method:
0 commit comments