cmelchior / vogar

Automatically exported from code.google.com/p/vogar
0 stars 0 forks source link

Hard to debug json parsing errors #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Got this error, its hard to figure out where in the file the problem is 
originating. 

loading expectations file libcore/expectations/icebox.txtException in thread 
"main" java.lang.RuntimeException: 
com.google.caliper.internal.gson.stream.MalformedJsonException: invalid number 
or unquoted string near  result: EXEC_FAILED,
  name: "org.apach
    at com.google.inject.mini.MiniGuice$3.get(MiniGuice.java:158)
    at com.google.inject.mini.MiniGuice$5.get(MiniGuice.java:268)
    at com.google.inject.mini.MiniGuice.keysToValues(MiniGuice.java:283)
    at com.google.inject.mini.MiniGuice.access$100(MiniGuice.java:43)
    at com.google.inject.mini.MiniGuice$4.get(MiniGuice.java:242)
    at com.google.inject.mini.MiniGuice.inject(MiniGuice.java:88)
    at vogar.Vogar.run(Vogar.java:532)
    at vogar.Vogar.main(Vogar.java:542)
Caused by: com.google.caliper.internal.gson.stream.MalformedJsonException: 
invalid number or unquoted string near  result: EXEC_FAILED,
  name: "org.apach
    at com.google.caliper.internal.gson.stream.JsonReader.syntaxError(JsonReader.java:1110)
    at com.google.caliper.internal.gson.stream.JsonReader.decodeLiteral(JsonReader.java:1100)
    at com.google.caliper.internal.gson.stream.JsonReader.peek(JsonReader.java:343)
    at com.google.caliper.internal.gson.stream.JsonReader.nextString(JsonReader.java:460)
    at vogar.ExpectationStore.readExpectation(ExpectationStore.java:155)
    at vogar.ExpectationStore.parse(ExpectationStore.java:128)
    at vogar.ExpectationStore.parse(ExpectationStore.java:112)
    at vogar.Vogar$Module.provideExpectationStore(Vogar.java:637)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.inject.mini.MiniGuice$3.get(MiniGuice.java:154)
    ... 7 more

Original issue reported on code.google.com by b...@google.com on 31 Jan 2011 at 6:40

GoogleCodeExporter commented 9 years ago
Initial problem is fixed. We still need to fix it upstream in GSON.
http://code.google.com/p/google-gson/issues/detail?id=282

As a separate step I'll add line and column numbers to JsonReader.

Original comment by jessewil...@google.com on 31 Jan 2011 at 7:11