Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error showing error #7

Open
KronosTheLate opened this issue Sep 25, 2022 · 2 comments
Open

Error showing error #7

KronosTheLate opened this issue Sep 25, 2022 · 2 comments

Comments

@KronosTheLate
Copy link

julia> f(x) = sqrt(x)
f (generic function with 1 method)

julia> f(-1)
ERROR: DomainError with -1.0:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
Stacktrace:
 [1] throw_complex_domainerror(f::Symbol, x::Float64)
   @ Base.Math ./math.jl:33
 [2] sqrt
   @ ./math.jl:591 [inlined]
 [3] sqrt
   @ ./math.jl:1372 [inlined]
 [4] f(x::Int64)
   @ Main ./REPL[1]:1
 [5] top-level scope
   @ REPL[2]:1

julia> using ClearStacktrace

julia> f(-1)
ERROR: DomainError with -1.0:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
SYSTEM (REPL): showing an error caused an error
ERROR: UndefVarError: LAST_SHOWN_LINE_INFOS not defined
SYSTEM (REPL): caught exception of type UndefVarError while trying to handle a nested exception; giving up

@jkrumbiegel
Copy link
Owner

I have no intention of doing anything with this repo anymore, after the gist got merged into Julia. You're free to fork though if you're interested in an improved version

@waldyrious
Copy link

I have no intention of doing anything with this repo anymore, after the gist got merged into Julia.

@jkrumbiegel how about adding a notice to the README explaining this (or even a repostatus.org badge)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants