Skip to content

Commit

Permalink
Response to code review to use pcall correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Sep 18, 2023
1 parent 8b0a5d0 commit 0453e15
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions busted/outputHandlers/json.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ return function(options)
errors = handler.errors,
duration = handler.getDuration()
}
local ok, result = pcall(function()
return json.encode(error_info)
end)
local ok, result = pcall(json.encode, error_info)

if ok then
io_write(result)
Expand Down

0 comments on commit 0453e15

Please sign in to comment.