gemini-hlsw / gem

prototype postgres back-end for ocs
Other
15 stars 5 forks source link

Handle unusual epochs when importing OCS2 programs #267

Open jdnavarro opened 6 years ago

jdnavarro commented 6 years ago

Program GN-2017A-Q-32 includes epochs with the value 2017.12. When importing this program the parser fails since we don't support any epochs other than B1950 and J2000.

java.lang.RuntimeException: Problem parsing GN-2017A-Q-32.xml: ParseError(2017.12,Epoch)
    at scala.sys.package$.error(package.scala:27)
    at gem.ocs2.FileImporter$.$anonfun$readAndInsert$1(FileImporter.scala:53)
    at cats.effect.internals.IORunLoop$.liftedTree3$1(IORunLoop.scala:194)
    at cats.effect.internals.IORunLoop$.step(IORunLoop.scala:194)
    at cats.effect.IO.unsafeRunTimed(IO.scala:222)
    at cats.effect.IO.unsafeRunSync(IO.scala:175)
    at gem.ocs2.FileImporter$.main(FileImporter.scala:78)
    at gem.ocs2.FileImporter.main(FileImporter.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sbt.Run.invokeMain(Run.scala:93)
    at sbt.Run.run0(Run.scala:87)
    at sbt.Run.execute$1(Run.scala:65)
    at sbt.Run.$anonfun$run$4(Run.scala:77)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
    at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
    at sbt.TrapExit$App.run(TrapExit.scala:252)
    at java.lang.Thread.run(Thread.java:748)
jdnavarro commented 6 years ago

Also this one fails: java.lang.RuntimeException: Problem parsing GN-2017B-FT-21.xml: ParseError(2000.2061,Epoch)