Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
someone-with-default-username committed Sep 6, 2012
1 parent 93126ad commit e3cde3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ncc/main.n
Expand Up @@ -143,7 +143,7 @@ namespace Nemerle.CommandlineCompiler
| e is MatchFailureException =>
bomb (e, "got MatchFailureException exception")
| e is ICE =>
bomb (e, e.msg)
bomb (e, e.Message)
| e is AssertionException =>
bomb (e, e.Message)
| _ is AssemblyFindException =>
Expand Down
23 changes: 7 additions & 16 deletions ncc/parsing/Utility.n
Expand Up @@ -41,21 +41,14 @@ using SCG = System.Collections.Generic;

namespace Nemerle.Compiler {

public class ICE : System.Exception
{
public msg : string;
public this (m : string) { this.msg = m }
}
[Record]
public sealed class ICE : System.Exception {}

public class Recovery : System.Exception
{
public this () {}
}
[Record]
public sealed class Recovery : System.Exception {}

public class BailOutException : System.Exception
{
public this () {}
}
[Record]
public sealed class BailOutException : System.Exception {}

public module Util
{
Expand All @@ -65,13 +58,11 @@ namespace Nemerle.Compiler {
mgr.GetNewId()
}

public ice[T] (msg : string) : T
public ice[T] (msg : string = "(see backtrace)") : T
{
System.Diagnostics.Debug.Assert(false, "ICE! (Internal Compiler Error)", msg);
throw ICE (msg)
}

public ice[T] () : T { ice("(see backtrace)") }

public is_capitalized (s : string) : bool
{
Expand Down

0 comments on commit e3cde3d

Please sign in to comment.