Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ArgCheck"
uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197"
license = "MIT"
version = "2.3.1"
version = "2.4.0"

[compat]
julia = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/checks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function build_error(info)
end
function build_error(info, checkflavor, msg::AbstractString)
E = default_exception_type(checkflavor)
E(msg)
E(msg * "\n" * error_message(info))
end

function build_error(info, checkflavor,
Expand Down
3 changes: 2 additions & 1 deletion test/checks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ end

@testset "custom message" begin
x = 0
@test_throws ArgumentError @argcheck x > 1 "this should not happen"
expected = ArgumentError("this should not happen\nx > 1 must hold. Got\nx => 0")
@test_throws expected @argcheck x > 1 "this should not happen"
@argcheck true "this should not happen"
end

Expand Down
Loading