Task #622 (closed)
Opened 12 years ago
Closed 12 years ago
Only throw omero.* exceptions from OMERO.blitz.
| Reported by: | jamoore | Owned by: | jamoore |
|---|---|---|---|
| Priority: | minor | Milestone: | 3.0-Beta2 |
| Component: | General | Version: | 3.0-Beta1 |
| Keywords: | iteration5, exceptions | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | n.a. |
Description (last modified by jmoore)
Currently several java.lang.* exceptions are being thrown from OMERO.blitz. That results in exceptions of the form:
glacier2router: warning: dispatch exception: OutgoingAsync.cpp:144: Ice::UnknownException:
unknown exception:
java.lang.IllegalArgumentException: ome.model.core.Image does not specify a valid class.
at omero.util.IceMapper.omeroClass(IceMapper.java:95)
at ome.services.icy.util.IceMethodInvoker.handleInput(IceMethodInvoker.java:208)
at ome.services.icy.util.IceMethodInvoker.invoke(IceMethodInvoker.java:152)
at ome.services.icy.impl.Interceptor.invoke(Interceptor.java:112)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy6.get(Unknown Source)
at omero.api._IQueryTie.get(_IQueryTie.java:120)
at omero.api._IQueryDisp.___get(_IQueryDisp.java:153)
at omero.api._IQueryDisp.__dispatch(_IQueryDisp.java:455)
at IceInternal.Incoming.invoke(Incoming.java:147)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2078)
at Ice.ConnectionI.message(ConnectionI.java:1239)
at IceInternal.ThreadPool.run(ThreadPool.java:788)
at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:1248)
rather than nothing in Glacier and the following in the client:
omero.ApiUsageException
serverStackTrace = ""
serverExceptionClass = ""
message = "ome.model.core.Image does not specify a valid class."
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at IceInternal.BasicStream$DynamicUserExceptionFactory.createAndThrow(BasicStream.java:2048)
at IceInternal.BasicStream.throwException(BasicStream.java:1450)
at omero.api._IQueryDelM.get(_IQueryDelM.java:475)
at omero.api.IQueryPrxHelper.get(IQueryPrxHelper.java:291)
at omero.api.IQueryPrxHelper.get(IQueryPrxHelper.java:276)
at ome.icy.model.itests.coverage.QueryTest.testGet(QueryTest.java:43)
Note: Add exceptions to LicenseAPI.ice
Change History (3)
comment:1 Changed 12 years ago by jmoore
- Description modified (diff)
- Keywords iteration5 added; iteration3 removed
comment:2 Changed 12 years ago by jmoore
This also goes for the C++ client side code. We'll probably want to generate specific client-side (local) exceptions in Error.ice
comment:3 Changed 12 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
ClientErrors hierarchy added in Java and C++. It was difficult to make this work via Ice. Regular exceptions are checked, and local exceptions require local objects. Instead we'll have to do a language-specific hierarchy for each binding. Keeping the same names is probably a good idea.
There may be issues with who throws what, but this is looking much better.
Pushing back a bit, since this'll be general clean up.