cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (Akvelon)" <>
Subject RE: [DISCUSS] Cordova CLI error reporting
Date Wed, 11 Nov 2015 06:04:02 GMT
Actionable items here IMO are:
1. Discuss initial list of error codes
2. Revisit code:
    a) Replace plain strings w/ CordovaError instance when we report failure
    b) Specify error codes according to list above when creating CordovaError instances


-----Original Message-----
From: Sergey Grebnov (Akvelon) [] 
Sent: Wednesday, November 11, 2015 8:59 AM
Subject: RE: [DISCUSS] Cordova CLI error reporting

Cordova.raw which is used by CLI and other tools use promises which are rejected w/ CordovaError
[1] or just a string in case of error. So technically we support error codes but I don't think
we specify them in many places. 

As per particular error codes,, the following list could be a good start...

* ToolExecutionError Android ADB or other tool failed 
* InvalidStateError he object is in an invalid state, for example working directory is not
a cordova directory, or something is corrupted (dependency plugin has been removed manually,
* EncodingError  The encoding operation, being an encoding or a decoding one, failed, for
example we are unable to parse config.xml
* NotSupportedError The operation is not supported (for example platform does not support
this method or parameter) NetworkError A network error occurred.
* TimeoutError The operation timed out.
* AbortError The operation was aborted.
* InvalidEnvironmentError We don't have some required tools installed (or similar) NotFoundError
The object can not be found here.


-----Original Message-----
From: Dmitry Blotsky []
Sent: Wednesday, November 11, 2015 8:50 AM
To: <> <>
Subject: [DISCUSS] Cordova CLI error reporting

Hey folks,

Does the Cordova CLI have a meaningful status code and error description it returns when various
errors happen? Or do we only return 0/1 for success/failure and then just print out some hopefully
decipherable information on stderr?

I know we have some effort in improving logging in Cordova; is that effort addressing this?

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message