[ 
https://issues.apache.org/jira/browse/CB-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436804#comment-13436804
 ] 

Patrick Mueller commented on CB-1234:
-------------------------------------

I've added a comment to the pull request, with the quoted text below.  The 
comment is placed on one of the method invocations on {{OriginalConsole}}.

I _believe_ that the "weinre demo" shipped with weinre will exhibit this 
problem, when run on an iOS device.  The demo uses {{markTimeline()}} (or 
whatever, or maybe it used to and I removed it), which is not implemented in 
iOS's {{console}}.

{quote}
All methods sent to OriginalConsole need to be wrapped in a try/catch, or 
otherwise protected. In some/many/all cases, the native platforms don't 
implement all/any of the console methods, and blindly calling a null will cause 
exceptions in the user's code.

Nothing special to do when an exception occurs in these cases, just march on. 
But they do need protection.
{quote}
                
> Console should queue log messages if not connected
> --------------------------------------------------
>
>                 Key: CB-1234
>                 URL: https://issues.apache.org/jira/browse/CB-1234
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: weinre
>    Affects Versions: 2.0.0
>            Reporter: Matt Johnson
>            Assignee: Patrick Mueller
>
> Console log messages (log, debug, error, info, warn) from the target may be 
> lost if they are executed on the device before the remote connection is fully 
> complete.  These should be queued up if there is no remote connection (and 
> dequeued when one is acquired) so all log messages are retained.
> I have a pull request at 
> https://github.com/apache/incubator-cordova-weinre/pull/8 that does this as 
> well as turns the Console into a passthru so that all calls to Console still 
> act on the OriginalConsole as well as the RemoteConsole so that the target 
> behavior with weinre is unchanged.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to