Skip to content

Commit

Permalink
chore(doc): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
s1n7ax committed Mar 31, 2024
1 parent 03abf6f commit c268e8f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Take a look at before and after
**Before:**

```lua
client.request('workspace/executeCommand', cmd_info, function(err, res)
request('workspace/executeCommand', cmd_info, function(err, res)
if err then
log.error(err)
else
Expand All @@ -22,7 +22,7 @@ end, buffer)

```lua
-- on error, statement will fail throwing an error just like any synchronous API
local result = client.request('workspace/executeCommand', cmd_info, buffer)
local result = request('workspace/executeCommand', cmd_info, buffer)
log.debug(result)
```

Expand Down Expand Up @@ -88,3 +88,11 @@ runner(function()
end)
.run()
```

### Output

```txt
18:44:46 starting the execution
18:44:48 success_result is: hello world
18:44:50 parent error handler ...-async-await/lua/async/waits/wait_with_error_handler.lua:14: ...-async-await/lua/async/waits/wait_with_error_handler.lua:14: something went wrong
```

0 comments on commit c268e8f

Please sign in to comment.