tracker issue : CF-4126708

select a category, or use search below
(searches all categories and all time range)
Title:

CLI returns 0 error code even when the script errors

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 03/09/2016

Components: CLI

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Normal / Few users will encounter

Locale/System: English / Win All

Vote Count: 1

From PR forum:

[quote]
[...] when erroring, CFML one seem to return a code of 0, which means "OK". An erroring script [...] *shouldn’t* return a 0 (this’d be like returning a 200 OK for an error on an HTTP request)
[/quote]

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126708

External Customer Info:
External Company: Straker Interactive
External Customer Name: Adam Cameron
External Customer Email: CAMERON.ADAM@GMAIL.COM
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Date Closed newValue: 2015-09-21 21:30:49.0 oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: Closed By newValue: hkallae oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: Owner newValue: Blank oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: Reason newValue: Blank oldValue: Fixed oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: Status newValue: Fixed oldValue: ToTest oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-22 04:30:49.0 action: updated fieldName: Date Fixed newValue: 2015-08-18 03:41:44.0 oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Fixed By newValue: himar oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Owner newValue: hkallae oldValue: himar oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Changelist newValue: 294965 oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Reason newValue: Fixed oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-18 10:41:44.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Severity newValue: 2 oldValue: 3 oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: updated fieldName: Owner newValue: himar oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-20 10:50:11.0 action: added fieldName: Vote Type newValue: BETA oldValue: Blank oprid: prerelease recordName: AD_DEFECT_VOTE timpestamp: 2015-07-16 18:38:10.0
Comment by CFwatson U.
3443 | March 09, 2016 04:43:41 AM GMT
Indeed. If a CFML script errors out in any way (e.g., an exception), then the CLI must return a non-zero error code.
Vote by External U.
3445 | March 09, 2016 04:43:42 AM GMT
Added By: PreRelease User User Name:Sean Corfield Note Added: Confirmed that the 9/15 build exits with 1 if an unhandled exception is thrown (i.e., onError() is not invoked). That's a good first step. We still need CF-4021635 addressed, so we can decide ourselves to exit with a non-zero status. Date Added :2015-09-15 21:54:01.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Entered Bug. Date Added :2015-07-16 07:07:10.0
Comment by CFwatson U.
3444 | March 09, 2016 04:43:44 AM GMT