You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Jared Stewart (JIRA)" <ji...@apache.org> on 2017/05/24 17:39:04 UTC

[jira] [Created] (GEODE-2984) Gfsh command error handling should use exceptions rather than status returns

Jared Stewart created GEODE-2984:
------------------------------------

             Summary: Gfsh command error handling should use exceptions rather than status returns
                 Key: GEODE-2984
                 URL: https://issues.apache.org/jira/browse/GEODE-2984
             Project: Geode
          Issue Type: Bug
          Components: gfsh
            Reporter: Jared Stewart


Currently, a given gfsh command either returns an InfoResultData (in the happy case) or an ErrorResultData (in the exceptional case).  This requires putting error handling code inside of *each* command separately.   It would be far better to instead allow gfsh commands throw an exception, and to have GfshExecutionStrategy (or somewhere similar) handle wrapping up any exception into an ErrorResultData in a generic fashion.

It may also be worth looking at the built-in mechanism in Spring Shell for this strategy (see afterThrowingInvocation): http://docs.spring.io/autorepo/docs/spring-shell/1.2.0.M1/api/org/springframework/shell/core/ExecutionProcessor.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)