Skip to content

Commit

Permalink
Remove function names from error messages. Finish JuliaLang#5031
Browse files Browse the repository at this point in the history
  • Loading branch information
magistere committed Dec 16, 2013
1 parent 12b8a32 commit bd90fa4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions base/dsp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export FFTW, filt, deconv, conv, conv2, xcorr, fftshift, ifftshift,
fft!, bfft!, ifft!, plan_fft!, plan_bfft!, plan_ifft!

function filt{T<:Number}(b::Union(AbstractVector{T}, T),a::Union(AbstractVector{T}, T),x::AbstractVector{T})
if isempty(b); error("filt: b must be non-empty"); end
if isempty(a); error("filt: a must be non-empty"); end
if a[1]==0; error("filt: a[1] must be nonzero"); end
if isempty(b); error("b must be non-empty"); end
if isempty(a); error("a must be non-empty"); end
if a[1]==0; error("a[1] must be nonzero"); end

as = length(a)
bs = length(b)
Expand Down
2 changes: 1 addition & 1 deletion base/env.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function _jl_win_getenv(s::String,len::Uint32)
val=zeros(Uint8,len-1)
ret=ccall(:GetEnvironmentVariableA,stdcall,Uint32,(Ptr{Uint8},Ptr{Uint8},Uint32),s,val,len)
if ret==0||ret!=len-1 #Trailing 0 is only included on first call to GetEnvA
error("getenv: unknown system error: ", s, len, ret)
error("unknown system error: ", s, len, ret)
end
val
end
Expand Down
2 changes: 1 addition & 1 deletion base/libc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function strptime(fmt::ByteString, timestr::ByteString)
# exposed in the API.
# tm.isdst = -1
if r == C_NULL
error("strptime: invalid arguments")
error("invalid arguments")
end
tm
end
Expand Down
2 changes: 1 addition & 1 deletion base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function airy(k::Int, z::Complex128)
pointer(ae,1), pointer(ae,2))
return complex(ai[1],ai[2])
else
error("airy: invalid argument")
error("invalid argument")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion base/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ end

function parse(str::String; raise::Bool=true)
ex, pos = parse(str, start(str), greedy=true, raise=raise)
done(str, pos) || error("syntax: extra token after end of expression")
done(str, pos) || error("extra token after end of expression")
return ex
end

Expand Down
4 changes: 2 additions & 2 deletions base/subarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ slice(A::AbstractArray, I...) = slice(A, ntuple(length(I), i-> isa(I[i], Colon)
# for j in sdims
# if i == j
# if size(a, i) != 1
# error("slice: dimension ", i, " has length greater than 1")
# error("dimension ", i, " has length greater than 1")
# end
# next = 1
# break
Expand All @@ -164,7 +164,7 @@ slice(A::AbstractArray, I...) = slice(A, ntuple(length(I), i-> isa(I[i], Colon)
# for j in sdims
# if i == j
# if length(next) != 1
# error("slice: dimension ", i," has length greater than 1")
# error("dimension ", i," has length greater than 1")
# end
# next = isa(next, Int) ? next : first(next)
# break
Expand Down

0 comments on commit bd90fa4

Please sign in to comment.