Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Support CTFE exception handling
Browse files Browse the repository at this point in the history
Just exposes the constructors for Exception and Error, so that they are
CTFEable.
  • Loading branch information
Don Clugston committed Nov 4, 2011
1 parent b727000 commit 2b936bf
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions import/object.di
Expand Up @@ -321,15 +321,31 @@ class Throwable : Object

class Exception : Throwable
{
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null);
this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__);
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null)
{
super(msg, file, line, next);
}

this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__)
{
super(msg, file, line, next);
}
}


class Error : Throwable
{
this(string msg, Throwable next = null);
this(string msg, string file, size_t line, Throwable next = null);
this(string msg, Throwable next = null)
{
super(msg, next);
bypassedException = null;
}

this(string msg, string file, size_t line, Throwable next = null)
{
super(msg, file, line, next);
bypassedException = null;
}
Throwable bypassedException;
}

Expand Down

0 comments on commit 2b936bf

Please sign in to comment.