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

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

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

    https://github.com/apache/cordova-cli/pull/125#discussion_r10983854
  
    --- Diff: src/metadata/tizen_parser.js ---
    @@ -0,0 +1,131 @@
    +var Q = require( "q" ),
    +   shelljs = require( "shelljs" ),
    +   util = require( "../util" ),
    +   elementTree = require( "elementtree" ),
    +   exec = require( "child_process" ).exec,
    +   path = require( "path" );
    +
    +function genPackageId() {
    +   var idx,
    +           returnValue = "";
    +           characters = [
    +                   "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
    +                   "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
    +                   "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
    +                   "u", "v", "w", "x", "y", "z" ];
    +
    +   for ( idx = 0 ; idx < 10 ; idx++ ) {
    +           returnValue += ( characters[ Math.round( Math.random() * 35 ) ] 
);
    +   }
    +
    +   return returnValue;
    +}
    +
    +module.exports = function tizen_parser( project ) {
    +   this.path = project;
    +}
    +
    +// Returns a promise
    +module.exports.check_requirements = function( project_root ) {
    +   var deferred = Q.defer();
    +
    +   exec( "web-build", {}, function( error, stdout, stderr ) {
    +           if ( error ) {
    +                   deferred.reject( new Error( "Requirements check failed. 
Command 'web-build' not found." ) );
    --- End diff --
    
    Please see CB-6337 and use CordovaError instead of Error (don't forget to 
add the require for it)


> Print nice error when cordova-cli hits various expected things
> --------------------------------------------------------------
>
>                 Key: CB-6337
>                 URL: https://issues.apache.org/jira/browse/CB-6337
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.4.0
>            Reporter: Josh Soref
>            Assignee: Josh Soref
>
> CB-5782 introduced a way to silence stack traces for expected failures, but 
> it missed some spots.
> This is a first pass against things in CLI itself -- it doesn't cover errors 
> coming from plugman.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to