Skip to content

Commit

Permalink
Update exception line numbers for doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jul 20, 2016
1 parent ee5e231 commit 6bbf1db
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5449,7 +5449,7 @@ julia> deleteat!([6, 5, 4, 3, 2, 1], 1:2:5)
julia> deleteat!([6, 5, 4, 3, 2, 1], (2, 2))
ERROR: ArgumentError: indices must be unique and sorted
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:511
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:536
...
```
"""
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/conversion-and-promotion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ to one and zero:

julia> convert(Bool, 1im)
ERROR: InexactError()
in convert(::Type{Bool}, ::Complex{Int64}) at ./complex.jl:18
in convert(::Type{Bool}, ::Complex{Int64}) at ./complex.jl:23
...

julia> convert(Bool, 0im)
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/mathematical-operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ The following examples show the different forms.

julia> round(Int8,127.6)
ERROR: InexactError()
in trunc(::Type{Int8}, ::Float64) at ./float.jl:425
in round(::Type{Int8}, ::Float64) at ./float.jl:180
in trunc(::Type{Int8}, ::Float64) at ./float.jl:456
in round(::Type{Int8}, ::Float64) at ./float.jl:211
...

See :ref:`man-conversion-and-promotion` for how to define your own
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/stacktraces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ alias :obj:`StackTrace` can be used in place of ``Vector{StackFrame}``. (Example
in eval_user_input(::Any, ::Bool) at client.jl:117
in eval(::Module, ::Any) at boot.jl:234
in eval_user_input(::Any, ::Bool) at client.jl:117
in _start() at client.jl:359
in _start() at client.jl:355

julia> @noinline child() = stacktrace()
child (generic function with 1 method)
Expand Down
8 changes: 4 additions & 4 deletions doc/manual/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ such an invalid byte index, an error is thrown:

julia> s[2]
ERROR: UnicodeError: invalid character index
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:69
in next at ./strings/string.jl:94 [inlined]
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:67
in next at ./strings/string.jl:92 [inlined]
in getindex(::String, ::Int64) at ./strings/basic.jl:70
...

julia> s[3]
ERROR: UnicodeError: invalid character index
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:69
in next at ./strings/string.jl:94 [inlined]
in slow_utf8_next(::Array{UInt8,1}, ::UInt8, ::Int64) at ./strings/string.jl:67
in next at ./strings/string.jl:92 [inlined]
in getindex(::String, ::Int64) at ./strings/basic.jl:70
...

Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ Dequeues

julia> deleteat!([6, 5, 4, 3, 2, 1], (2, 2))
ERROR: ArgumentError: indices must be unique and sorted
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:511
in deleteat!(::Array{Int64,1}, ::Tuple{Int64,Int64}) at ./array.jl:536
...

.. function:: splice!(collection, index, [replacement]) -> item
Expand Down

0 comments on commit 6bbf1db

Please sign in to comment.