Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Mar 22, 2023
1 parent c457db3 commit 6b860aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TruncatedStacktraces"
uuid = "781d530d-4396-4725-bb49-402e4bee1e77"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "1.2.0"
version = "1.2.1"

[deps]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ how to effect the type printing. This is done by adding `println(io, VERBOSE_MSG

## Default values

* `TruncatedStacktraces.VERBOSE[]` defaults to `false` for non-CI workflows and to `true` for CI jobs.
* `TruncatedStacktraces.DISABLE` defaults to `false`.
* `TruncatedStacktraces.VERBOSE[]` defaults to `false` for non-CI workflows and to `true` for CI jobs.
* `TruncatedStacktraces.DISABLE` defaults to `false`.

## Disabling TruncatedStacktraces.jl

Expand Down
7 changes: 4 additions & 3 deletions src/TruncatedStacktraces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ macro truncate_stacktrace(l::Symbol, short_display...)
kwargs = []

body = quote
if TruncatedStacktraces.VERBOSE[]
wparams = [$(whereparams[[short_display...]]...)]
any_not_defined = any(!@isdefined(w) for w in wparams)
if TruncatedStacktraces.VERBOSE[] || any_not_defined
invoke(show, Tuple{IO, Type}, io, t)
else
print(io,
string($l) * "{" *
join([$(whereparams[[short_display...]]...)], ", ") *
string($l) * "{" * join(wparams, ",") *
$(length(short_display) == 0 ? "" : ",") * "…}")
end
end
Expand Down

0 comments on commit 6b860aa

Please sign in to comment.