Permalink
Browse files

Handling code gen error more gracefully

  • Loading branch information...
fogus committed Jul 24, 2013
1 parent 8ff1e7d commit 6a732912cc5443cf07c863d52455988126f1c015
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/clj/himera/server/service.clj
@@ -22,8 +22,8 @@
(def generate-js-response (partial generate-response
(fn [data]
- (pr-str {:js (string/trim-newline
- (:result data))}))))
+ (let [code (or (:result data) "'HIMERA ERROR: NOTHING GENERATED'")]
+ (pr-str {:js (string/trim-newline code)})))))
(def generate-ast-response (partial generate-response
(fn [data]

0 comments on commit 6a73291

Please sign in to comment.