You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2009/10/21 01:25:59 UTC

[jira] Commented: (SHINDIG-1202) Exceptions thrown in js Shindig code

    [ https://issues.apache.org/jira/browse/SHINDIG-1202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768006#action_12768006 ] 

Paul Lindner commented on SHINDIG-1202:
---------------------------------------

ah yes..  looks like one can't reference console.log in this fashion.  

I'll get this.


> Exceptions thrown in js Shindig code
> ------------------------------------
>
>                 Key: SHINDIG-1202
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1202
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>         Environment: Safari, Chrome (Mac, Win, Linux)
>            Reporter: Vadim Gerasimov
>
> The following code throws "Uncaught TypeError: Illegal invocation" exception in gadgets running in Safari and Chrome. Other browsers are not affected. In some cases the gadgets stop working after the exception.
> ...
> gadgets.log.logAtLevel = function(level, message) {
>  if (level < gadgets.log.logLevelThreshold_ || !window.console) {
>    return;
>  }
>  var logger = window.console.log;
>  if (level == gadgets.log.WARNING && window.console.warn) {
>    logger = window.console.warn;
>  } else if (level == gadgets.log.ERROR && window.console.error) {
>    logger = window.console.error;
>  }
>  logger(message); // **** Exception here ****
> };
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.