@@ -98,6 +98,8 @@ public class RuntimeExceptionFactory {
9898
9999 // NotImplemented
100100 public static final Type ParseError = TF .constructor (TS , Exception , "ParseError" , TF .sourceLocationType (), "location" );
101+
102+ // this comes from lang::json::IO
101103 public static final Type NoOffsetParseError = TF .constructor (TS , Exception , "NoOffsetParseError" , TF .sourceLocationType (), "location" , TF .integerType (), "line" , TF .integerType (), "column" );
102104
103105 public static final Type PathNotFound = TF .constructor (TS ,Exception ,"PathNotFound" ,TF .sourceLocationType (), "location" );
@@ -686,11 +688,11 @@ public static Throw jsonParseError(ISourceLocation loc, String cause, String pat
686688 }
687689
688690 public static Throw jsonParseError (ISourceLocation file , int line , int col , String cause , String path ) {
689- // TODO Auto-generated method stub
690- throw new UnsupportedOperationException ("Unimplemented method 'jsonParseError'" );
691+ return new Throw (VF .constructor (NoOffsetParseError , file , VF .integer (line ), VF .integer (col ))
692+ .asWithKeywordParameters ().setParameter ("reason" , VF .string (cause ))
693+ .asWithKeywordParameters ().setParameter ("path" , VF .string (path )));
691694 }
692695
693-
694696 public static Throw parseError (ISourceLocation loc , AbstractAST ast , StackTrace trace ) {
695697 return new Throw (VF .constructor (ParseError , loc ), ast != null ? ast .getLocation () : null , trace );
696698 }
0 commit comments