Skip to content

Commit 1bf4166

Browse files
committed
more verbose error message at output checking
1 parent 608469c commit 1bf4166

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/app/callbacks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function _callback!(func::Union{Function, ClientsideFunction, String}, app::Dash
129129
check_callback(func, app, deps)
130130

131131
out_symbol = Symbol(output_string(deps))
132-
haskey(app.callbacks, out_symbol) && error("Multiple callbacks can not target the same output.")
132+
haskey(app.callbacks, out_symbol) && error("Multiple callbacks can not target the same output. Offending output: $(out_symbol)")
133133
callback_func = make_callback_func!(app, func, deps)
134134
push!(
135135
app.callbacks,

test/callbacks.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,10 @@ end
319319
return value
320320
end
321321

322-
@test_throws ErrorException callback!(app, Output("my-div","children"), Input("my-id2","value")) do value
322+
testresult = @test_throws ErrorException callback!(app, Output("my-div","children"), Input("my-id2","value")) do value
323323
return "v_$(value)"
324324
end
325+
@test testresult.value.msg == "Multiple callbacks can not target the same output. Offending output: my-div.children"
325326
end
326327

327328
@testset "empty triggered params" begin

0 commit comments

Comments
 (0)