forked from eclipse-che/che
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cli] Improve UX of graceful shutdown message (eclipse-che#4064)
* Fix eclipse-che#1682 : Improve UX of graceful shutdown message - base scripts : catch error code of action lifecycle and return it - cha-lib : return error code based on http error code - display better message when auth is required - skip graceful mode when repo is mounted Change-Id: I1ad021426444b5b4d880df518512e53ef4828336 Signed-off-by: Florent BENOIT <[email protected]>
- Loading branch information
Showing
5 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2016-2016 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*/ | ||
/** | ||
* Error message used to provide custom exit code | ||
* @author Florent Benoit | ||
*/ | ||
export class ErrorMessage { | ||
|
||
private exitCode? : number = 1; | ||
|
||
private error : any; | ||
|
||
constructor(error: any, exitCode : number) { | ||
this.error = error; | ||
if (exitCode) { | ||
this.exitCode = exitCode; | ||
} | ||
console.log("build error message with exit code", exitCode); | ||
} | ||
|
||
|
||
|
||
getExitCode() : number { | ||
return this.exitCode; | ||
} | ||
|
||
getError() : any { | ||
return this.error; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters