GUACAMOLE-44: Add GuacamoleStreamException for reporting errors from intercepted streams.

This commit is contained in:
Michael Jumper
2016-06-05 15:41:52 -07:00
parent 131785a442
commit 75baa69cea
5 changed files with 188 additions and 8 deletions

View File

@@ -42,6 +42,14 @@ angular.module('rest').factory('Error', [function defineError() {
*/
this.message = template.message;
/**
* The Guacamole protocol status code associated with the error that
* occurred. This is only valid for errors of type STREAM_ERROR.
*
* @type Number
*/
this.statusCode = template.statusCode;
/**
* The type string defining which values this parameter may contain,
* as well as what properties are applicable. Valid types are listed
@@ -110,7 +118,16 @@ angular.module('rest').factory('Error', [function defineError() {
*
* @type String
*/
PERMISSION_DENIED : 'PERMISSION_DENIED'
PERMISSION_DENIED : 'PERMISSION_DENIED',
/**
* An error occurred within an intercepted stream, terminating that
* stream. The Guacamole protocol status code of that error will be
* stored within statusCode.
*
* @type String
*/
STREAM_ERROR : 'STREAM_ERROR'
};