Skip to content

Commit

Permalink
fix: Fix syntax error in exceptions example. (#93)
Browse files Browse the repository at this point in the history
* Update 04-exceptions.md

I spent so much time figuring out why my client app was giving errors since I was not experienced with custom exceptions on the client side, I was like why is it not working then I looked on Google and found out this Exception name doesn't need brackets, Please merge this, many new developers like me can be stuck and then stress why my code is not working.

* Update 04-exceptions.md

Added the fix in the docs folder same as added in the versioned docs folder for the Fix 
Refer #93 for the commits
  • Loading branch information
akshaybengani authored Apr 22, 2024
1 parent d3e6ee1 commit 28c2e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/05-concepts/04-exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ In your app, catch the exception as you would catch any exception.
try {
client.example.doThingy();
}
on (MyException) catch(e) {
on MyException catch(e) {
print(e.message);
}
catch(e) {
print('Something else went wrong.');
}
```
```
4 changes: 2 additions & 2 deletions versioned_docs/version-1.2.0/05-concepts/04-exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ In your app, catch the exception as you would catch any exception.
try {
client.example.doThingy();
}
on (MyException) catch(e) {
on MyException catch(e) {
print(e.message);
}
catch(e) {
print('Something else went wrong.');
}
```
```

0 comments on commit 28c2e91

Please sign in to comment.