# Nasty Base.show() recursive stack backtrace error

**URL:** <https://discourse.julialang.org/t/nasty-base-show-recursive-stack-backtrace-error/10088>\
**Category:** Internals & Design\
**Created:** [March 31, 2018, 6:24pm UTC](https://discourse.julialang.org/t/nasty-base-show-recursive-stack-backtrace-error/10088 "2018-03-31T18:24:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [March 31, 2018, 6:24pm UTC](https://discourse.julialang.org/t/nasty-base-show-recursive-stack-backtrace-error/10088/1 "2018-03-31T18:24:01Z")

</div>

```julia
julia> struct FFF; fv::Float64; end#struct

julia> Base.show(io::IO, f::FFF) = println(io, "Your FFF type is $f.fv")

julia> f= FFF(2.0)

```

I do not yet know why this is not working, but it will probably be obvious to me soon.

alas, this is not my point. I wonder whether the error should be a little less nasty. maybe the display could terminate printing after a screen full of stack backtraces, the same way that a long vector is stopped?

---

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [March 31, 2018, 6:57pm UTC](https://discourse.julialang.org/t/nasty-base-show-recursive-stack-backtrace-error/10088/2 "2018-03-31T18:57:10Z")

</div>

> I do not yet know why this is not working

You want the string to be:

```julia
"Your FFF type is $(f.fv)"

```

Otherwise it tries to interpolate and show only “f” which leads to the endless recursive call.

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [March 31, 2018, 7:42pm UTC](https://discourse.julialang.org/t/nasty-base-show-recursive-stack-backtrace-error/10088/3 "2018-03-31T19:42:38Z")

</div>

makes perfect sense.
