2014년 6월 3일 화요일 오후 8시 6분 43초 UTC+9, Paul Butcher 님의 말: > I’m sure that I’m missing something really basic and will kick myself when > it’s pointed out, but I’m trying to get goog.debug.ErrorReporter working and > falling at the first hurdle. > > > I’ve created a bare-bones project to demonstrate the issue: > > > https://github.com/paulbutcher/ErrorTest > > > This is just a minimal Compojure server together with the following > ClojureScript: > > > > (ns errortest.core > > (:require [goog.debug.ErrorReporter :as reporter])) > > > > > (reporter/install "/logError") > > (.foobar js/window) > > > > When I run this, I can see the error about js/window not having a “foobar” > method in the console, but nothing is sent to my server. > > > Many thanks in advance for pointing out my stupid mistake. > > > > -- > paul.butcher->msgCount++ > > Silverstone, Brands Hatch, Donington Park... > Who says I have a one track mind? > > http://www.paulbutcher.com/ > LinkedIn: http://www.linkedin.com/in/paulbutcher > Skype: paulrabutcher > > > Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel > http://pragprog.com/book/pb7con
official closure api. http://closure-library.googlecode.com/svn-history/r9/trunk/closure/goog/docs/class_goog_debug_ErrorReporter.html `(reporter/install "/logError")` returns `goog.debug.ErrorReporter`. so use `goog.debug.ErrorReporter` instance. ```clojure (def r (reporter/install "/log-error")) (try (.foobar js/window) (catch js/Error e (let [message "message" ;; or (.-stack e) fileName "fileName" line 12345] (.sendErrorReport r message fileName line)))) ``` -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
