cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10518) Cordova reports error events with incorrect log level
Date Fri, 12 Feb 2016 18:56:18 GMT

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

ASF GitHub Bot commented on CB-10518:
-------------------------------------

Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/383#discussion_r52782123
  
    --- Diff: cordova-lib/src/cordova/create.js ---
    @@ -191,8 +191,8 @@ function create(dir, optionalId, optionalName, cfg) {
     
                     return remoteLoad.gitClone(gitURL, branch).fail(
                         function(err) {
    -                        events.emit('verbose', err);
    -                        return Q.reject('Failed to retrieve '+ cfg.lib.www.url + ' using
git.');
    +                        events.emit('warn', err.message);
    +                        return Q.reject(new CordovaError('Failed to retrieve '+ cfg.lib.www.url
+ ' using git.'));
    --- End diff --
    
    Should the `err.message` be appended to new CordovaError or the original `err` be passed
as inner error?


> Cordova reports error events with incorrect log level
> -----------------------------------------------------
>
>                 Key: CB-10518
>                 URL: https://issues.apache.org/jira/browse/CB-10518
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 6.0.0
>            Reporter: Vladimir Kotikov
>            Priority: Minor
>              Labels: triaged
>
> In case of fatal errors {{cordova run}} and {{cordova emulate}} methods emit error messages
using {{log}} event. This code probably should be changed to use 'warn' level. (We can't use
'error' here due to its special meaning in Node: https://nodejs.org/api/events.html#events_error_events)
> There is also other places, where 'log' events is used incorrectly:
> cordova-lib\src\cordova\targets.js:        events.emit('log', 'An unexpected error has
occured');
> cordova-lib\src\plugman\browserify.js:        events.emit('log', 'error while generating
cordova.js');
> cordova-lib\src\plugman\browserify.js:            events.emit('log', 'Error running platform
version script');



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message