# Is there a option for different \`MethodError\` printing?

**URL:** <https://discourse.julialang.org/t/is-there-a-option-for-different-methoderror-printing/79523>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 15, 2022, 8:38am UTC](https://discourse.julialang.org/t/is-there-a-option-for-different-methoderror-printing/79523 "2022-04-15T08:38:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [April 15, 2022, 8:38am UTC](https://discourse.julialang.org/t/is-there-a-option-for-different-methoderror-printing/79523/1 "2022-04-15T08:38:03Z")

</div>

Hi all 🙂

Sometimes I would like to switch to a different `MethodError` printing. The following is as it is:

```julia
julia> f(a,b,c,d,e,f,g,h,i,j,k) = nothing
f (generic function with 1 method)

julia> f(1)
ERROR: MethodError: no method matching f(::Int64)
Closest candidates are:
  f(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at REPL[1]:1
Stacktrace:
 [1] top-level scope
   @ REPL[2]:1

```

And here is how I would like it to be:

```julia
julia> f(1)
ERROR: MethodError: no method matching 
  f(
      ::Int64
  )
Closest candidates are:
  f(
      a::Any, 
      b::Any, 
      c::Any, 
      d::Any, 
      e::Any, 
      f::Any, 
      g::Any, 
      h::Any, 
      i::Any, 
      j::Any, 
      k::Any
  ) at REPL[1]:1
Stacktrace:
 [1] top-level scope
   @ REPL[2]:1

```

Cheers

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [April 18, 2022, 9:37am UTC](https://discourse.julialang.org/t/is-there-a-option-for-different-methoderror-printing/79523/2 "2022-04-18T09:37:20Z")

</div>

Where is the error printing defined?

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 18, 2022, 2:14pm UTC](https://discourse.julialang.org/t/is-there-a-option-for-different-methoderror-printing/79523/3 "2022-04-18T14:14:14Z")

</div>

I think it starts [here](https://github.com/JuliaLang/julia/blob/a9d8c859c71c7ed4aaa370ae659eba8eea263f4d/base/errorshow.jl#L207). You could have searched `MethodError` in the GitHub, as it is rare to have `MethodError` explicitly thrown, there is not so many pages of results.
