Skip to content

Commit

Permalink
error id to code (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijscox authored May 29, 2021
1 parent ebe74f0 commit 30ef4ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion julia-package/brainflow/src/errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ macro brainflow_rethrow(defun)
# use the function name in the error message
wrapup_ccall = quote
if ec != Integer(STATUS_OK)
msg = string("Error in ", $(name), " ", Integer(ec))
msg = string("Error in ", $(name), " ", BrainFlow.BrainflowExitCodes(Integer(ec)))
throw(BrainFlowError(msg, Integer(ec)))
end
end
Expand Down
2 changes: 1 addition & 1 deletion julia-package/brainflow/test/julia_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ end
# use a board that is not connected
params = BrainFlow.BrainFlowInputParams()
board_shim = BrainFlow.BoardShim(BrainFlow.CYTON_BOARD, params)
@test_throws BrainFlow.BrainFlowError("Error in prepare_session 13", 13) BrainFlow.prepare_session(board_shim)
@test_throws BrainFlow.BrainFlowError("Error in prepare_session INVALID_ARGUMENTS_ERROR", 13) BrainFlow.prepare_session(board_shim)
end

@testset "generated functions" begin
Expand Down

0 comments on commit 30ef4ae

Please sign in to comment.