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
Thx! Sergey -----Original Message----- From: Sergey Grebnov (Akvelon) [mailto:v-seg...@microsoft.com] Sent: Wednesday, November 11, 2015 8:59 AM To: dev@cordova.apache.org 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, etc) * 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. [1] https://github.com/apache/cordova-lib/blob/master/cordova-common/src/CordovaError/CordovaError.js#L37 Thx! Sergey -----Original Message----- From: Dmitry Blotsky [mailto:dblot...@microsoft.com] Sent: Wednesday, November 11, 2015 8:50 AM To: <dev@cordova.apache.org> <dev@cordova.apache.org> 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? Kindly, Dmitry --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org