@@ -283,6 +283,18 @@ function print_response(repl::AbstractREPL, response, show_value::Bool, have_col
283
283
end
284
284
return nothing
285
285
end
286
+
287
+ function repl_display_error (errio:: IO , @nospecialize errval)
288
+ # this will be set to true if types in the stacktrace are truncated
289
+ limitflag = Ref (false )
290
+ errio = IOContext (errio, :stacktrace_types_limited => limitflag)
291
+ Base. invokelatest (Base. display_error, errio, errval)
292
+ if limitflag[]
293
+ print (errio, " \n Some type information was truncated. Use `show(err)` to see complete types." )
294
+ end
295
+ return nothing
296
+ end
297
+
286
298
function print_response (errio:: IO , response, show_value:: Bool , have_color:: Bool , specialdisplay:: Union{AbstractDisplay,Nothing} = nothing )
287
299
Base. sigatomic_begin ()
288
300
val, iserr = response
@@ -292,7 +304,7 @@ function print_response(errio::IO, response, show_value::Bool, have_color::Bool,
292
304
if iserr
293
305
val = Base. scrub_repl_backtrace (val)
294
306
Base. istrivialerror (val) || setglobal! (Base. MainInclude, :err , val)
295
- Base . invokelatest (Base . display_error, errio, val)
307
+ repl_display_error ( errio, val)
296
308
else
297
309
if val != = nothing && show_value
298
310
try
@@ -315,7 +327,7 @@ function print_response(errio::IO, response, show_value::Bool, have_color::Bool,
315
327
try
316
328
excs = Base. scrub_repl_backtrace (current_exceptions ())
317
329
setglobal! (Base. MainInclude, :err , excs)
318
- Base . invokelatest (Base . display_error, errio, excs)
330
+ repl_display_error ( errio, excs)
319
331
catch e
320
332
# at this point, only print the name of the type as a Symbol to
321
333
# minimize the possibility of further errors.
0 commit comments