Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global option to control shiny error behaviour #249

Closed
hadley opened this issue Sep 30, 2013 · 3 comments
Closed

Global option to control shiny error behaviour #249

hadley opened this issue Sep 30, 2013 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Sep 30, 2013

Please, for the love of god, give us some way to debug shiny apps. The easiest way would be a global option, e.g. shiny.try, which we could use to turn shiny's error handling off so that any error would immediately return to the console and provide a useful traceback.

@alexbbrown
Copy link

ROFL. And better symbolifications than: Error occurred in func().

@jcheng5
Copy link
Member

jcheng5 commented Sep 30, 2013

I'm up for that if you, @wch, or @yihui want to take a crack at it.

@yihui
Copy link
Member

yihui commented Sep 30, 2013

Duplicate of #217? I definitely agree we should do this, and I often feel this pain as well.

@alexbbrown Before this issue is fixed, perhaps I can make a simpler fix by changing func to funk. That will certainly make more sense 😈

@yihui yihui closed this as completed in 6af7de5 Oct 17, 2013
trestletech added a commit to trestletech/shiny that referenced this issue Oct 18, 2013
Squashed:

commit 828d254
Author: trestletech <jeff.allen@trestletechnology.net>
Date:   Fri Oct 18 16:46:40 2013 -0500

    Added ability to specify input parsers.

    commit 0327d7337b79d59ff8a3d226b7a24e00510d8dc8
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Fri Oct 18 16:43:49 2013 -0500

        Refactored to use S3-dispatch for custom input

        Now 3rd parties can define how to process incoming data based on S3-dispatching on the "type" field.

        Sets class of incoming object based on "type" field. Converts NULLs to empty lists.

    commit 5b397dd915984c0d3c5dd48a733601a2cd7d1d83
    Merge: 2567878 ec2992c
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Fri Oct 18 11:45:06 2013 -0500

        Merge branch 'master' of github.com:rstudio/shiny into input-registry

    commit 2567878
    Merge: ded217d 6a90dee
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Thu Oct 10 20:11:09 2013 -0500

        Merge branch 'master' of github.com:trestletech/shiny into input-registry

    commit ded217d
    Merge: 02a7b86 55cc4de
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Thu Oct 10 20:10:47 2013 -0500

        Merge branch 'master' into input-registry

    commit 6a90dee
    Merge: 55cc4de 03a6f17
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Fri Oct 4 09:13:29 2013 -0500

        Merge remote-tracking branch 'rstudio/master'

    commit 02a7b86
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Mon Sep 16 12:21:51 2013 -0500

        Renamed "inputHandler" to "inputTypes" per conversation with Joe.

    commit 55cc4de
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Mon Sep 16 12:21:51 2013 -0500

        Renamed "inputHandler" to "inputTypes" per conversation with Joe.

    commit 57435b0
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Wed Sep 11 21:09:18 2013 -0500

        Create a user-extensible registry of custom Shiny Input handlers.

        Brought in the existing handlers for date, matrix, and numeric. Allow users to add/remove handlers via the new addInputHandler and removeInputHandler functions. The addInputHandler function accepts a callback which wil be called with the input value, shinysession object, and element name.

    commit bfcff0e
    Merge: a84c45f 004b7c7
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Wed Sep 11 21:10:24 2013 -0500

        Merge branch 'master' of github.com:rstudio/shiny

    commit a84c45f
    Author: trestletech <jeff.allen@trestletechnology.net>
    Date:   Wed Sep 11 21:09:18 2013 -0500

        Create a user-extensible registry of custom Shiny Input handlers.

        Brought in the existing handlers for date, matrix, and numeric. Allow users to add/remove handlers via the new addInputHandler and removeInputHandler functions. The addInputHandler function accepts a callback which wil be called with the input value, shinysession object, and element name.

commit 0587b7a
Merge: 6a90dee ec2992c
Author: trestletech <jeff.allen@trestletechnology.net>
Date:   Fri Oct 18 11:44:13 2013 -0500

    Merge branch 'master' of github.com:rstudio/shiny

commit ec2992c
Merge: 6192085 6452f62
Author: Joe Cheng <joe@joecheng.com>
Date:   Thu Oct 17 09:44:03 2013 -0700

    Merge pull request rstudio#264 from rstudio/feature/debug-hooks

    Export installExprFunction and add supporting documentation

commit 6192085
Merge: f4a4af0 e94de15
Author: Joe Cheng <joe@joecheng.com>
Date:   Thu Oct 17 09:39:01 2013 -0700

    Merge pull request rstudio#273 from yihui/feature/callinghandlers

    use withCallingHandlers() so that users can do error handling like recover()

commit e94de15
Author: Yihui Xie <xie@yihui.name>
Date:   Wed Oct 16 15:42:36 2013 -0500

    well, we still have to use do.call(`$`) on .self; closes rstudio#274

    Winston reported the issue at https://stat.ethz.ch/pipermail/r-devel/2013-October/067744.html

    partially reverted 86d61e0

commit 6af7de5
Author: Yihui Xie <xie@yihui.name>
Date:   Wed Oct 16 00:57:54 2013 -0500

    another attempt to close rstudio#249, using withCallingHandlers() instead of modifying tryCatch()

    also closes rstudio#217 if everyone agrees with this approach

commit f4a4af0
Merge: 6934838 4da53ef
Author: Joe Cheng <joe@joecheng.com>
Date:   Mon Oct 14 11:02:20 2013 -0700

    Merge pull request rstudio#265 from yihui/bug/offset

    a more reliable solution for e.offsetX/Y in Firefox

commit 6934838
Merge: 0caf944 1aadd25
Author: Joe Cheng <joe@joecheng.com>
Date:   Fri Oct 11 07:51:34 2013 -0700

    Merge pull request rstudio#268 from rstudio/feature/parent-notify-disconnected

    send disconnected message to parent frame when running on localhost

commit 1aadd25
Author: JJ Allaire <jj@rstudio.org>
Date:   Wed Oct 9 10:44:48 2013 -0400

    notify iframe parent of disconnect when on the same domain

commit 0caf944
Author: Winston Chang <winston@stdout.org>
Date:   Wed Oct 9 16:04:14 2013 -0500

    Fix typo

commit 6452f62
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Tue Oct 8 23:24:27 2013 -0700

    use a check hint (globalVariables()) in favor of modifying code in renderImage

commit e061dfd
Author: Yihui Xie <xie@yihui.name>
Date:   Tue Oct 8 23:42:19 2013 -0500

    roxygenize

commit 4da53ef
Author: Yihui Xie <xie@yihui.name>
Date:   Tue Oct 8 23:34:34 2013 -0500

    a better solution for e.offsetX/Y in Firefox based on http://stackoverflow.com/q/12704686/559676

    which fixes the bug reported by Greg D: https://groups.google.com/forum/#!topic/shiny-discuss/E6oYvyvx0oU

commit 347e44f
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Tue Oct 8 15:29:35 2013 -0700

    look up function by name (for R CMD check --as-cran)

commit 8997fa7
Merge: 19ba6ef 6407390
Author: Joe Cheng <joe@joecheng.com>
Date:   Tue Oct 8 13:58:17 2013 -0700

    Merge pull request rstudio#252 from jcheng5/random-ports2

    Try up to 20 random ports if necessary

commit 19ba6ef
Author: JJ Allaire <jj@rstudio.org>
Date:   Tue Oct 8 15:59:03 2013 -0400

    allow a custom function for the launch.browser parameter

commit d10cbc9
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Tue Oct 8 10:36:31 2013 -0700

    export and add docs for installExprFunction

commit 6c7d9de
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Mon Oct 7 11:11:59 2013 -0700

    simplify syntax for creating new debuggable expressions

commit 6d04e89
Merge: 03a6f17 2beb241
Author: Yihui Xie <xie@yihui.name>
Date:   Sun Oct 6 15:50:01 2013 -0700

    Merge pull request rstudio#262 from yihui/r-check

    synchronize doc

commit 2beb241
Author: Yihui Xie <xie@yihui.name>
Date:   Sun Oct 6 17:45:44 2013 -0500

    roxygenize

commit 16c5f4e
Author: Yihui Xie <xie@yihui.name>
Date:   Wed Oct 2 23:31:59 2013 -0500

    no need to expose the documentation to users; expose registerShinyDebugHook to R so that R CMD check does not complain

    per discussion in rstudio#258, and closes rstudio#259

commit 6a90dee
Merge: 55cc4de 03a6f17
Author: trestletech <jeff.allen@trestletechnology.net>
Date:   Fri Oct 4 09:13:29 2013 -0500

    Merge remote-tracking branch 'rstudio/master'

commit 03a6f17
Merge: 4c89a00 9fb61d8
Author: Joe Cheng <joe@joecheng.com>
Date:   Wed Oct 2 20:06:46 2013 -0700

    Merge pull request rstudio#258 from rstudio/feature/debug-hooks

    Add debug hook (when present) for functions generated by exprToFunction

commit 9fb61d8
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Wed Oct 2 12:27:44 2013 -0700

    tag Shiny server function for special debug treatment if needed

commit bc3322d
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Wed Oct 2 10:47:38 2013 -0700

    allow debugging Shiny server function itself

commit 06c7bf7
Author: Jonathan McPherson <jonathan@rstudio.com>
Date:   Wed Oct 2 08:53:45 2013 -0700

    invoke debug hook function if present after instantiating app functions

commit 4c89a00
Merge: 648120c 86d61e0
Author: Yihui Xie <xie@yihui.name>
Date:   Tue Oct 1 23:33:44 2013 -0700

    Merge pull request rstudio#257 from yihui/trycatch

    rewrite some instances of do.call()

commit 86d61e0
Author: Yihui Xie <xie@yihui.name>
Date:   Mon Sep 30 17:18:28 2013 -0500

    we do not really need do.call() in these cases

commit 6407390
Author: Joe Cheng <joe@rstudio.com>
Date:   Mon Sep 30 16:13:46 2013 -0700

    Try up to 20 random ports if necessary

commit 648120c
Merge: ce5b3f2 b60d6cc
Author: Yihui Xie <xie@yihui.name>
Date:   Sat Sep 28 21:30:42 2013 -0700

    Merge pull request rstudio#243 from jcheng5/master

    Conditional panel expressions were broken for typed inputs

commit ce5b3f2
Merge: de01c96 5308ca1
Author: Joe Cheng <joe@joecheng.com>
Date:   Fri Sep 27 12:36:49 2013 -0700

    Merge pull request rstudio#245 from rstudio/feature/random-port

    choose a random port for runApp

commit 5308ca1
Author: JJ Allaire <jj@rstudio.org>
Date:   Fri Sep 27 15:36:02 2013 -0400

    use .globals rather than .runContext

commit 6df6d40
Author: JJ Allaire <jj@rstudio.org>
Date:   Fri Sep 27 07:59:44 2013 -0400

    choose a random port for runApp and continue to use it for the duration of the session unless explicitly overridden

commit b60d6cc
Author: Joe Cheng <joe@rstudio.org>
Date:   Thu Sep 26 15:31:14 2013 -0700

    Conditional panel expressions were broken for typed inputs

commit de01c96
Merge: 31d2ecc 40cc78a
Author: Joe Cheng <joe@joecheng.com>
Date:   Thu Sep 26 10:37:56 2013 -0700

    Merge pull request rstudio#235 from crtahlin/patch-2

    Typo fix.

commit 31d2ecc
Merge: 2f8502a 268f1e8
Author: Joe Cheng <joe@joecheng.com>
Date:   Thu Sep 26 10:37:31 2013 -0700

    Merge pull request rstudio#234 from crtahlin/patch-1

    Typo fix.

commit 2f8502a
Author: Yihui Xie <xie@yihui.name>
Date:   Tue Sep 24 14:54:18 2013 -0500

    save coordmap in $el.data() so it can be dynamically retrieved

    6161eaa was an inappropriate fix

    (jcheng: cherry-picked from @yihui/master)

commit d377b04
Author: Joe Cheng <joe@rstudio.com>
Date:   Thu Sep 19 22:53:11 2013 -0700

    Make websocket path relative to Shiny page path

    This is necessary for proxy situations that don't override the
    Shiny.createSocket function (so, not including Shiny Server,
    but more like Nginx, HAProxy, and a future version of RStudio
    Server).

    Without the path being preserved, it's impossible for these
    proxies to know that the URL should be forwarded to the host
    and port that belongs to Shiny.

commit 55cc4de
Author: trestletech <jeff.allen@trestletechnology.net>
Date:   Mon Sep 16 12:21:51 2013 -0500

    Renamed "inputHandler" to "inputTypes" per conversation with Joe.

commit 40cc78a
Author: crtahlin <crt.ahlin@gmail.com>
Date:   Sat Sep 14 23:12:45 2013 +0200

    Typo fix.

commit 268f1e8
Author: crtahlin <crt.ahlin@gmail.com>
Date:   Sat Sep 14 22:54:20 2013 +0200

    Typo fix.

commit bfcff0e
Merge: a84c45f 004b7c7
Author: trestletech <jeff.allen@trestletechnology.net>
Date:   Wed Sep 11 21:10:24 2013 -0500

    Merge branch 'master' of github.com:rstudio/shiny

commit 004b7c7
Author: Winston Chang <winston@stdout.org>
Date:   Wed Sep 11 11:09:18 2013 -0500

    Add mailing list information to README

commit 33b293f
Merge: e2509ed ad584a9
Author: Winston Chang <winston@stdout.org>
Date:   Thu Sep 5 17:53:51 2013 -0700

    Merge pull request rstudio#226 from crtahlin/patch-2

    Fixed typo.

commit ad584a9
Author: crtahlin <crt.ahlin@gmail.com>
Date:   Thu Sep 5 17:25:27 2013 +0200

    Fixed typo.

commit e2509ed
Merge: c839bb2 b9f72d0
Author: Jeff Allen <jeff.allen@trestletechnology.net>
Date:   Thu Sep 5 08:09:03 2013 -0700

    Merge pull request rstudio#225 from crtahlin/patch-1

    Fixed typo.

commit b9f72d0
Author: crtahlin <crt.ahlin@gmail.com>
Date:   Thu Sep 5 16:35:04 2013 +0200

    Fixed typo.

commit c839bb2
Merge: c65aa97 3016136
Author: Joe Cheng <joe@joecheng.com>
Date:   Wed Sep 4 10:38:04 2013 -0700

    Merge pull request rstudio#224 from yihui/patch-1

    websockets has been changed to httpuv

commit 3016136
Author: Yihui Xie <xie@yihui.name>
Date:   Tue Sep 3 17:24:05 2013 -0500

    websockets has been changed to httpuv

commit c65aa97
Author: Winston Chang <winston@stdout.org>
Date:   Thu Aug 29 11:44:30 2013 -0500

    Bump version to 0.7.0.99 for development

commit bc72b8f
Merge: f089531 ed8537b
Author: Joe Cheng <joe@joecheng.com>
Date:   Tue Aug 27 16:50:00 2013 -0700

    Merge pull request rstudio#214 from hadley/doc-tweaks

    Doc tweaks

commit f089531
Author: Winston Chang <winston@stdout.org>
Date:   Tue Aug 27 10:08:03 2013 -0500

    Put man-roxygen in .Rbuildignore

commit 8d8ea53
Author: Winston Chang <winston@stdout.org>
Date:   Mon Aug 26 14:19:50 2013 -0500

    Fixes to imports for R-devel

commit 89e405e
Author: Winston Chang <winston@stdout.org>
Date:   Mon Aug 26 12:03:02 2013 -0500

    Bump version to 0.7.0

commit ca984a6
Author: Joe Cheng <joe@rstudio.com>
Date:   Sun Aug 25 22:19:20 2013 -0700

    Implement shiny.sharedSecret option

commit fa39a55
Author: Joe Cheng <joe@rstudio.com>
Date:   Fri Aug 23 15:42:19 2013 -0700

    Wow, IE10 is *really* picky about websocket URLs

commit c3a1ba2
Author: Joe Cheng <joe@rstudio.com>
Date:   Fri Aug 23 15:38:12 2013 -0700

    Make websocket URL work with IE10

    See websockets/ws#131 (comment)

commit 86e291f
Author: Joe Cheng <joe@rstudio.com>
Date:   Fri Aug 23 13:10:53 2013 -0700

    Add docs for showReactLog. Un-export writeReactLog.

commit dd1d443
Merge: cbfde18 e2c2e23
Author: Jeff Allen <jeff.allen@trestletechnology.net>
Date:   Fri Aug 23 12:16:23 2013 -0700

    Merge pull request rstudio#218 from wch/fix-log

    Cleanups to reactive logging code for R CMD check

commit cbfde18
Author: Joe Cheng <joe@rstudio.com>
Date:   Fri Aug 23 12:03:11 2013 -0700

    More updates to NEWS

commit e2c2e23
Author: Winston Chang <winston@stdout.org>
Date:   Fri Aug 23 12:16:18 2013 -0500

    Cleanups to reactive logging code for R CMD check

    * Fix 'env' partial argument match for get().
    * Fix unbound variable access of .shiny__stdout.
    * Restructure if statement so test is only done once.

commit 40cc5d5
Author: Winston Chang <winston@stdout.org>
Date:   Fri Aug 23 12:07:34 2013 -0500

    Doc fixes for R CMD check

commit 9765194
Author: Winston Chang <winston@stdout.org>
Date:   Fri Aug 23 10:16:47 2013 -0500

    Bump httpuv version dependency to 1.1.0

commit 628465e
Author: Winston Chang <winston@stdout.org>
Date:   Fri Aug 23 10:16:12 2013 -0500

    Update NEWS

commit 58706df
Author: Winston Chang <winston@stdout.org>
Date:   Fri Aug 23 10:16:05 2013 -0500

    Update sliderInput docs

commit b19225c
Author: Joe Cheng <joe@rstudio.com>
Date:   Fri Aug 23 02:13:24 2013 -0700

    Don't send websocket subprotocol

    Some time recently, Google Chrome started actually caring what the
    client sends for this and what the server replies with. httpuv
    doesn't currently have any logic for subprotocol selection, so
    it always replies with no Sec-WebSocket-Protocol header, which
    now Google Chrome reacts to by closing the websocket connection.

    This problem goes away if we just don't send a subprotocol at all.

commit c304889
Merge: 1a6901c 05a9204
Author: Joe Cheng <joe@joecheng.com>
Date:   Thu Aug 22 13:55:11 2013 -0700

    Merge pull request rstudio#208 from trestletech/master

    Add reactive timing logging, if the necessary variables are available.

commit ed8537b
Author: hadley <h.wickham@gmail.com>
Date:   Wed Aug 14 13:37:14 2013 -0500

    Redue duplication in docs betwee date/dateRange

commit 6a9ae10
Author: hadley <h.wickham@gmail.com>
Date:   Wed Aug 14 13:33:44 2013 -0500

    Add cross-references between input types

commit 0535890
Author: hadley <h.wickham@gmail.com>
Date:   Wed Aug 14 13:31:16 2013 -0500

    Re-document

commit 1a6901c
Author: hadley wickham <h.wickham@gmail.com>
Date:   Wed Aug 14 13:25:42 2013 -0500

    Document range slider

commit 7aaba82
Author: Winston Chang <winston@stdout.org>
Date:   Mon Aug 5 14:02:50 2013 -0500

    Add is.reactivevalues function

commit 8c45dcd
Merge: 6c155b0 a5db7d0
Author: Winston Chang <winston@stdout.org>
Date:   Mon Aug 5 12:02:14 2013 -0700

    Merge pull request rstudio#205 from hadley/master

    Class output of reactive.

commit 6c155b0
Merge: 194d2f9 cd8ad9a
Author: Winston Chang <winston@stdout.org>
Date:   Sat Jul 27 17:43:01 2013 -0700

    Merge pull request rstudio#197 from wch/fix-style

    Add compatibility wrapper for getComputedStyle in IE8

commit cd8ad9a
Author: Winston Chang <winston@stdout.org>
Date:   Tue Jul 9 11:48:24 2013 -0500

    Add compatibility wrapper for getComputedStyle in IE8

commit a5db7d0
Author: hadley <h.wickham@gmail.com>
Date:   Sat Jul 27 11:06:35 2013 -0500

    Class output of reactive.
    Also add print method and test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants