Git Product home page Git Product logo

Comments (2)

leonoel avatar leonoel commented on May 26, 2024 1

Fixed in b.22

from missionary.

mjmeintjes avatar mjmeintjes commented on May 26, 2024

If I remove the mbx flow and replace it with m/seed, I get a NullPointerException, but this one is catchable. However, I would still expect that the error thrown (ex-info "Invalid") should be the one caught.

(do
    (def cancel
      ((ms/sp
        (try
          (ms/? (ms/reactor
                 (let [state (ms/stream! (ms/ap
                                          (let [r (ms/?> (ms/seed [2 1]))]
                                            (if (= r 1)
                                              (throw (ex-info "Invalid" {:a 123}))
                                              r))))]
                   (ms/stream!
                    (ms/ap (println (ms/?> state)))))))
          (println "DONE")
          (catch Exception ex
            (println "ERROR IS VISIBLE")
            (throw ex))))
       prn prn)))
ERROR IS VISIBLE
#error {
 :cause nil
 :via
 [{:type java.lang.NullPointerException
   :message nil
   :at [missionary.impl.Reactor signal "Reactor.java" 93]}]
 :trace
 [[missionary.impl.Reactor signal "Reactor.java" 93]
  [missionary.impl.Reactor emit "Reactor.java" 187]
  [missionary.impl.Reactor leave "Reactor.java" 210]
  [missionary.impl.Reactor context "Reactor.java" 361]
  [missionary.impl$context invokeStatic "impl.clj" 100]
  [missionary.impl$context invoke "impl.clj" 100]
  [missionary.core$reactor_call$fn__51676 invoke "core.cljc" 719]
  [missionary.impl.Sequential task "Sequential.java" 86]
  [missionary.impl$fiber_task invokeStatic "impl.clj" 39]
  [missionary.impl$fiber_task invoke "impl.clj" 39]
  [missionary.core$_QMARK_ invokeStatic "core.cljc" 172]
  [missionary.core$_QMARK_ invoke "core.cljc" 164]
  [mattsum.task_feed.statecharts$fn__119870$cr119857_block_1__119873 invoke "NO_SOURCE_FILE" 364]
  [cloroutine.impl$coroutine$fn__51204 invoke "impl.cljc" 60]
  [missionary.impl.Sequential step "Sequential.java" 49]
  [missionary.impl.Sequential <init> "Sequential.java" 61]
  [missionary.impl$sp invokeStatic "impl.clj" 32]
  [missionary.impl$sp invoke "impl.clj" 32]
  [cloroutine.impl$coroutine$fn__51204 invoke "impl.cljc" 65]
  [clojure.core$partial$fn__5857 invoke "core.clj" 2629]
  [clojure.lang.AFn applyToHelper "AFn.java" 156]
  [clojure.lang.RestFn applyTo "RestFn.java" 132]
  [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3706]
  [clojure.lang.Compiler$DefExpr eval "Compiler.java" 457]
  [clojure.lang.Compiler eval "Compiler.java" 7186]
  [clojure.lang.Compiler eval "Compiler.java" 7170]
  [clojure.lang.Compiler eval "Compiler.java" 7136]
  [clojure.core$eval invokeStatic "core.clj" 3202]
  [clojure.core$eval invoke "core.clj" 3198]
  [nrepl.middleware.interruptible_eval$evaluate$fn__79437$fn__79438 invoke "interruptible_eval.clj" 87]
  [clojure.lang.AFn applyToHelper "AFn.java" 152]
  [clojure.lang.AFn applyTo "AFn.java" 144]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.core$with_bindings_STAR_ invokeStatic "core.clj" 1977]
  [clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1977]
  [clojure.lang.RestFn invoke "RestFn.java" 425]
  [nrepl.middleware.interruptible_eval$evaluate$fn__79437 invoke "interruptible_eval.clj" 87]
  [clojure.main$repl$read_eval_print__9110$fn__9113 invoke "main.clj" 437]
  [clojure.main$repl$read_eval_print__9110 invoke "main.clj" 437]
  [clojure.main$repl$fn__9119 invoke "main.clj" 458]
  [clojure.main$repl invokeStatic "main.clj" 458]
  [clojure.main$repl doInvoke "main.clj" 368]
  [clojure.lang.RestFn applyTo "RestFn.java" 137]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.core$apply invoke "core.clj" 662]
  [refactor_nrepl.ns.slam.hound.regrow$wrap_clojure_repl$fn__97450 doInvoke "regrow.clj" 20]
  [clojure.lang.RestFn invoke "RestFn.java" 1523]
  [nrepl.middleware.interruptible_eval$evaluate invokeStatic "interruptible_eval.clj" 84]
  [nrepl.middleware.interruptible_eval$evaluate invoke "interruptible_eval.clj" 56]
  [nrepl.middleware.interruptible_eval$interruptible_eval$fn__79468$fn__79472 invoke "interruptible_eval.clj" 152]
  [clojure.lang.AFn run "AFn.java" 22]
  [nrepl.middleware.session$session_exec$main_loop__79700$fn__79704 invoke "session.clj" 202]
  [nrepl.middleware.session$session_exec$main_loop__79700 invoke "session.clj" 201]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 832]]}

from missionary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.