Skip to content

Commit

Permalink
Stacktrace formatting improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvikli committed Feb 25, 2025
1 parent 512fe7d commit e6dfb31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/ToolInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ is_cancelled(tool::AbstractTool) = false
"""
Usually stop_sequence and toolname are static for type
"""
toolname(tool::Type{<:AbstractTool})::String = (@warn "Unimplemented \"toolname\" for $(tool) $(stacktrace())"; return "")
toolname(tool::Type{<:AbstractTool})::String = (@warn "Unimplemented \"toolname\" for $(tool) $(join(stacktrace(), "\n"))"; return "")
toolname(tool::AbstractTool)::String = toolname(typeof(tool))
stop_sequence(tool::Type{<:AbstractTool})::String = (@warn "Unimplemented \"stop_sequence\" for $(typeof(tool))"; return "")
stop_sequence(::Type{<:AbstractTool})::String = (@warn "Unimplemented \"stop_sequence\" for $(typeof(tool)) $(join(stacktrace(), "\n"))"; return "")
stop_sequence(tool::AbstractTool)::String = stop_sequence(typeof(tool))
get_description(tool::Type{<:AbstractTool})::String = (@warn "Unimplemented \"get_description\" for $(typeof(tool))"; return "unknown tool! $(tool)")
get_description(tool::Type{<:AbstractTool})::String = (@warn "Unimplemented \"get_description\" for $(typeof(tool)) $(join(stacktrace(), "\n"))"; return "unknown tool! $(tool)")
get_description(tool::AbstractTool)::String = get_description(typeof(tool))

has_stop_sequence(tool::Type{<:AbstractTool})::Bool = stop_sequence(tool) != ""
Expand Down

0 comments on commit e6dfb31

Please sign in to comment.