geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Stewart (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GEODE-2984) Gfsh command error handling should use exceptions rather than status returns
Date Wed, 24 May 2017 17:39:04 GMT
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)

Mime
View raw message