Permalink
Browse files

log when a transition isn't possible

  • Loading branch information...
1 parent 302cc08 commit b7048938d88d774d2bae575e59d8f4312d44d366 @nathanmarz committed Dec 18, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/clj/backtype/storm/daemon/nimbus.clj
View
12 src/clj/backtype/storm/daemon/nimbus.clj
@@ -145,11 +145,13 @@
(let [get-event (fn [m e]
(if (contains? m e)
(m e)
- (when error-on-no-transition?
- (throw-runtime "No transition for event: " event
- ", status: " status,
- " storm-id: " storm-id)
- )))
+ (let [msg (str "No transition for event: " event
+ ", status: " status,
+ " storm-id: " storm-id)]
+ (if error-on-no-transition?
+ (throw-runtime msg)
+ (log-message msg)
+ ))))
transition (-> (state-transitions nimbus storm-id status)
(get (:type status))
(get-event event))

0 comments on commit b704893

Please sign in to comment.