To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
test (generic function with 1 method)
👀 Reading hidden code
function test(a)
throw(InexactError(:test, a, a))
end
399 μs
Error message

InexactError: test(

Failed to show error:


MethodError: no method matching nameof(::Vector{Vector{Int64}})

Closest candidates are:

nameof(::DataType) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/reflection.jl:223

nameof(::UnionAll) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/reflection.jl:224

nameof(::Module) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/reflection.jl:16

...

Stacktrace:

[1] showerror(io::IOContext{IOBuffer}, ex::InexactError)

@ Base ./errorshow.jl:168

[2] try_showerror(::IOBuffer, ::InexactError)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/display/Exception.jl:144

[3] sprint(f::Function, args::InexactError; context::Nothing, sizehint::Int64)

@ Base ./strings/io.jl:114

[4] sprint(f::Function, args::InexactError)

@ Base ./strings/io.jl:108

[5] format_output(val::CapturedException; context::IOContext{Base.DevNull})

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/display/Exception.jl:88

[6] #52

@ ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/display/format_output.jl:45 [inlined]

[7] with_io_to_logs(f::PlutoRunner.var"#52#54"{Base.UUID, Base.UUID, Module, CapturedException, Dict{Tuple{UInt64, Int64}, Int64}}; enabled::Bool, loglevel::Base.CoreLogging.LogLevel)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/stdout.jl:64

[8] (::PlutoRunner.var"#126#127"{Bool, Base.CoreLogging.LogLevel, PlutoRunner.var"#52#54"{Base.UUID, Base.UUID, Module, CapturedException, Dict{Tuple{UInt64, Int64}, Int64}}})()

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:129

[9] with_logstate(f::Function, logstate::Any)

@ Base.CoreLogging ./logging.jl:511

[10] with_logger

@ ./logging.jl:623 [inlined]

[11] #with_logger_and_io_to_logs#125

@ ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/io/logging.jl:128 [inlined]

[12] formatted_result_of(notebook_id::Base.UUID, cell_id::Base.UUID, ends_with_semicolon::Bool, known_published_objects::Vector{String}, showmore::Nothing, workspace::Module; capture_stdout::Bool)

@ PlutoRunner ~/.julia/packages/Pluto/6smog/src/runner/PlutoRunner/src/display/format_output.jl:44

[13] top-level scope

@ ~/.julia/packages/Pluto/6smog/src/evaluation/WorkspaceManager.jl:491

[14] eval

@ ./boot.jl:373 [inlined]

[15] macro expansion

@ ~/.julia/packages/Malt/YJ2Ml/src/worker.jl:120 [inlined]

[16] (::var"#1#2"{Sockets.TCPSocket, UInt64, Bool, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Tuple{Module, Expr}, typeof(Core.eval)})()

@ Main ./task.jl:429

Stack trace

Here is what happened, the most recent locations are first:

  1. test(a::Vector{Vector{Int64}})
    function test(a)	throw(InexactError(:test, a, a))end
  2. Show more...
👀 Reading hidden code
test([[0]])
---
👀 Reading hidden code
struct Tomato
end
787 μs
function Base.show(io::IO, ::MIME"text/plain", t::Tomato)
throw(ErrorException("nooooo"))
end
👀 Reading hidden code
3.0 ms
rr = nothing
👀 Reading hidden code
10.7 μs
Error message

Failed to show value:

nooooo

Stack trace

Here is what happened, the most recent locations are first:

  1. show(io::IOContext{IOBuffer}, #unused#::MIME{Symbol("text/plain")}, t::Main.workspace#2.Tomato)
    function Base.show(io::IO, ::MIME"text/plain", t::Tomato)	throw(ErrorException("nooooo"))end
computer bad, you GREAT!
Tomato()
👀 Reading hidden code
10.6 μs

👀 Reading hidden code
66.8 μs
124
1+123
👀 Reading hidden code
11.2 μs
Error message

DomainError with -5.0:

sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).

Stack trace

Here is what happened, the most recent locations are first:

  1. throw_complex_domainerror(f::Symbol, x::Float64)
    from math.jl:33
  2. sqrt
  3. sqrt(x::Int64)
  4. try	sqrt(-5)catch ex	global ex = ex
¯\_(ツ)_/¯
CapturedException(ex, st)
👀 Reading hidden code
32.0 μs
Error message

DomainError with -10.0:

sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).

Stack trace

Here is what happened, the most recent locations are first:

  1. throw_complex_domainerror(f::Symbol, x::Float64)
    from math.jl:33
  2. sqrt
  3. sqrt
  4. f(x::Int64)
    function f(x)	sqrt(x)end
  5. Show more...
f(-10)
👀 Reading hidden code
---
f (generic function with 1 method)
function f(x)
sqrt(x)
end
👀 Reading hidden code
365 μs
try
sqrt(-5)
catch ex
global ex = ex
global st = stacktrace(catch_backtrace())
end
👀 Reading hidden code
30.1 ms
"DomainError with -5.0:\nsqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x))."
sprint(showerror, ex)
👀 Reading hidden code
53.2 ms
Error message

Multiple definitions for s

Combine all definitions into a single reactive cell using a `begin ... end` block.

s=st[2]
👀 Reading hidden code
---
Error message

Another cell defining s contains errors.

Oh no! 🙀
s.inlined
👀 Reading hidden code
---
Error message

Multiple definitions for s

Combine all definitions into a single reactive cell using a `begin ... end` block.

s=["<b>a</b>"]
👀 Reading hidden code
---

1

html"""
<script>
function render_filename(filename) {
}

return html`<p>${1}</p>${[]}`

return html`<div>${[1,2,3].map(i => html`<p>${i*i}</p>`)}</div>`

</script>


"""
👀 Reading hidden code
128 μs
html"""<script>
return html`asdf`
</script>"""
👀 Reading hidden code
118 μs
Error message

DomainError with -5.0:

sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).

CapturedException(ex, [])
👀 Reading hidden code
14.1 μs
Error message

Multiple expressions in one cell.

How would you like to fix it?

1
2
👀 Reading hidden code
---
Dict(:a => 1)
👀 Reading hidden code
17.0 μs
👀 Reading hidden code
123 μs