From 1273405f5e9d19de42772a2d142c595d49409725 Mon Sep 17 00:00:00 2001 From: Luis Benet Date: Wed, 6 May 2015 20:10:31 -0500 Subject: [PATCH] Add AssertionError as typealias of ExceptionError --- README.md | 2 ++ src/Compat.jl | 5 +++++ test/runtests.jl | 1 + 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 3305f79b8b753..7d1e068cda29c 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ Currently, the `@compat` macro supports the following syntaxes: * `typealias AbstractString String` - `String` has been renamed to `AbstractString` [#8872](https://github.com/JuliaLang/julia/pull/8872) +* `typealias AssertionError ErrorException` - `AssertionError` was introduced in [##9734](https://github.com/JuliaLang/julia/pull/#9734); before `@assert` threw an `ErrorException` + * For all unsigned integer types to their equivalents with uppercase `I`. [#8907](https://github.com/JuliaLang/julia/pull/8907) ## New functions diff --git a/src/Compat.jl b/src/Compat.jl index 43e681149630b..489a366631b4a 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -28,6 +28,11 @@ if VERSION < v"0.4.0-dev+1387" export AbstractString end +if VERSION < v"0.4.0-dev+3324" + typealias AssertionError ErrorException + export AssertionError +end + if VERSION < v"0.4.0-dev+412" eval(Base, :(const IPAddr = IpAddr)) end diff --git a/test/runtests.jl b/test/runtests.jl index ac7bf73e62869..98cc6b3d1dd70 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,7 @@ using Compat using Base.Test v = 1 +@test_throws AssertionError @assert(v < 1) d = Dict{Int,Int}() d[1] = 1