ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilCloudException Class Reference

Class ilCloudException. More...

+ Inheritance diagram for ilCloudException:
+ Collaboration diagram for ilCloudException:

Public Member Functions

 __construct ($exception_code, $exception_info="")
 
 __toString ()
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 A message isn't optional as in build in class Exception. More...
 

Data Fields

const UNKNONW_EXCEPTION = -1
 
const NO_SERVICE_ACTIVE = 1001
 
const NO_SERVICE_SELECTED = 1002
 
const SERVICE_NOT_ACTIVE = 1003
 
const SERVICE_CLASS_FILE_NOT_FOUND = 1004
 
const PLUGIN_HOOK_COULD_NOT_BE_INSTANTIATED = 1005
 
const FOLDER_NOT_EXISTING_ON_SERVICE = 1101
 
const FILE_NOT_EXISTING_ON_SERVICE = 1102
 
const FOLDER_ALREADY_EXISTING_ON_SERVICE = 1103
 
const AUTHENTICATION_FAILED = 2001
 
const DELETE_FAILED = 2101
 
const DOWNLOAD_FAILED = 2201
 
const FOLDER_CREATION_FAILED = 2301
 
const UPLOAD_FAILED = 2401
 
const UPLOAD_FAILED_MAX_FILESIZE = 2402
 
const ADD_ITEMS_FROM_SERVICE_FAILED = 2501
 
const INVALID_INPUT = 3001
 
const PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION = 4001
 
const ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION = 4002
 
const ID_ALREADY_EXISTS_IN_FILE_TREE_IN_SESSION = 4003
 
const PERMISSION_DENIED = 5001
 
const PERMISSION_TO_CHANGE_ROOT_FOLDER_DENIED = 5002
 

Protected Member Functions

 assignMessageToCode ()
 

Protected Attributes

 $message
 
 $code
 
 $add_info
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCloudException::__construct (   $exception_code,
  $exception_info = "" 
)
Parameters
string$exception_code
string$exception_info

Definition at line 47 of file class.ilCloudException.php.

References ILIAS\GlobalScreen\Provider\__construct(), and assignMessageToCode().

48  {
49  $this->code = $exception_code;
50  $this->add_info = $exception_info;
51  $this->assignMessageToCode();
52  parent::__construct($this->message, $this->code);
53  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilCloudException::__toString ( )

Definition at line 132 of file class.ilCloudException.php.

133  {
134  return get_class($this) . " '{$this->message}' in {$this->file}({$this->line})\n"
135  . "{$this->getTraceAsString()}";
136  }

◆ assignMessageToCode()

ilCloudException::assignMessageToCode ( )
protected

Definition at line 56 of file class.ilCloudException.php.

References $DIC, and $lng.

Referenced by __construct().

57  {
58  global $DIC;
59  $lng = $DIC['lng'];
60  switch ($this->code) {
61  case self::NO_SERVICE_ACTIVE:
62  $this->message = $lng->txt("cld_no_service_active");
63  break;
64  case self::NO_SERVICE_SELECTED:
65  $this->message = $lng->txt("cld_no_service_selected");
66  break;
67  case self::SERVICE_NOT_ACTIVE:
68  $this->message = $lng->txt("cld_service_not_active");
69  break;
70  case self::SERVICE_CLASS_FILE_NOT_FOUND:
71  $this->message = $lng->txt("cld_service_class_file_not_found");
72  break;
73  case self::FOLDER_NOT_EXISTING_ON_SERVICE:
74  $this->message = $lng->txt("cld_folder_not_existing_on_service");
75  break;
76  case self::FOLDER_ALREADY_EXISTING_ON_SERVICE:
77  $this->message = $lng->txt("cld_folder_already_existing_on_service");
78  break;
79  case self::FILE_NOT_EXISTING_ON_SERVICE:
80  $this->message = $lng->txt("cld_file_not_existing_on_service");
81  break;
82  case self::AUTHENTICATION_FAILED:
83  $this->message = $lng->txt("cld_authentication_failed");
84  break;
85  case self::DELETE_FAILED:
86  $this->message = $lng->txt("cld_delete_failed");
87  break;
88  case self::ADD_ITEMS_FROM_SERVICE_FAILED:
89  $this->message = $lng->txt("cld_add_items_from_service_failed");
90  break;
91  case self::DOWNLOAD_FAILED:
92  $this->message = $lng->txt("cld_add_download_failed");
93  break;
94  case self::FOLDER_CREATION_FAILED:
95  $this->message = $lng->txt("cld_folder_creation_failed");
96  break;
97  case self::UPLOAD_FAILED:
98  $this->message = $lng->txt("cld_upload_failed");
99  break;
100  case self::UPLOAD_FAILED_MAX_FILESIZE:
101  $this->message = $lng->txt("cld_upload_failed_max_filesize");
102  break;
103  case self::INVALID_INPUT:
104  $this->message = $lng->txt("cld_invalid_input");
105  break;
106  case self::PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION:
107  $this->message = $lng->txt("cld_path_does_not_exist_in_file_tree_in_session");
108  break;
109  case self::ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION:
110  $this->message = $lng->txt("cld_id_does_not_exist_in_file_tree_in_session");
111  break;
112  case self::ID_ALREADY_EXISTS_IN_FILE_TREE_IN_SESSION:
113  $this->message = $lng->txt("cld_id_already_exists_in_file_tree_in_session");
114  break;
115  case self::PLUGIN_HOOK_COULD_NOT_BE_INSTANTIATED:
116  $this->message = $lng->txt("cld_plugin_hook_could_not_be_instantiated");
117  break;
118  case self::PERMISSION_DENIED:
119  $this->message = $lng->txt("cld_permission_denied");
120  break;
121  case self::PERMISSION_TO_CHANGE_ROOT_FOLDER_DENIED:
122  $this->message = $lng->txt("cld_permission_to_change_root_folder_denied");
123  break;
124  default:
125  $this->message = $lng->txt("cld_unknown_exception");
126  break;
127  }
128  $this->message .= ($this->add_info ? ": " : "") . $this->add_info;
129  }
$lng
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

Field Documentation

◆ $add_info

ilCloudException::$add_info
protected

◆ $code

ilCloudException::$code
protected

Definition at line 39 of file class.ilCloudException.php.

◆ $message

ilCloudException::$message
protected

Definition at line 38 of file class.ilCloudException.php.

◆ ADD_ITEMS_FROM_SERVICE_FAILED

const ilCloudException::ADD_ITEMS_FROM_SERVICE_FAILED = 2501

Definition at line 31 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\addItemsFromService().

◆ AUTHENTICATION_FAILED

const ilCloudException::AUTHENTICATION_FAILED = 2001

Definition at line 25 of file class.ilCloudException.php.

Referenced by ilCloudPluginInitGUI\initGUI().

◆ DELETE_FAILED

const ilCloudException::DELETE_FAILED = 2101

Definition at line 26 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\deleteFromService().

◆ DOWNLOAD_FAILED

const ilCloudException::DOWNLOAD_FAILED = 2201

Definition at line 27 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\downloadFromService().

◆ FILE_NOT_EXISTING_ON_SERVICE

const ilCloudException::FILE_NOT_EXISTING_ON_SERVICE = 1102

Definition at line 23 of file class.ilCloudException.php.

◆ FOLDER_ALREADY_EXISTING_ON_SERVICE

const ilCloudException::FOLDER_ALREADY_EXISTING_ON_SERVICE = 1103

Definition at line 24 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\addFolderToService().

◆ FOLDER_CREATION_FAILED

const ilCloudException::FOLDER_CREATION_FAILED = 2301

Definition at line 28 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\addFolderToService().

◆ FOLDER_NOT_EXISTING_ON_SERVICE

const ilCloudException::FOLDER_NOT_EXISTING_ON_SERVICE = 1101

Definition at line 22 of file class.ilCloudException.php.

◆ ID_ALREADY_EXISTS_IN_FILE_TREE_IN_SESSION

const ilCloudException::ID_ALREADY_EXISTS_IN_FILE_TREE_IN_SESSION = 4003

Definition at line 35 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\addNode().

◆ ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION

const ilCloudException::ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION = 4002

◆ INVALID_INPUT

const ilCloudException::INVALID_INPUT = 3001

Definition at line 32 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\addFolderToService().

◆ NO_SERVICE_ACTIVE

const ilCloudException::NO_SERVICE_ACTIVE = 1001

Definition at line 17 of file class.ilCloudException.php.

Referenced by ilCloudConnector\getActiveServices().

◆ NO_SERVICE_SELECTED

const ilCloudException::NO_SERVICE_SELECTED = 1002

◆ PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION

const ilCloudException::PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION = 4001

◆ PERMISSION_DENIED

const ilCloudException::PERMISSION_DENIED = 5001

Definition at line 36 of file class.ilCloudException.php.

◆ PERMISSION_TO_CHANGE_ROOT_FOLDER_DENIED

const ilCloudException::PERMISSION_TO_CHANGE_ROOT_FOLDER_DENIED = 5002

Definition at line 37 of file class.ilCloudException.php.

Referenced by ilObjCloud\setRootFolder(), and ilObjCloud\setRootId().

◆ PLUGIN_HOOK_COULD_NOT_BE_INSTANTIATED

const ilCloudException::PLUGIN_HOOK_COULD_NOT_BE_INSTANTIATED = 1005

Definition at line 21 of file class.ilCloudException.php.

Referenced by ilCloudPlugin\__construct().

◆ SERVICE_CLASS_FILE_NOT_FOUND

const ilCloudException::SERVICE_CLASS_FILE_NOT_FOUND = 1004

Definition at line 20 of file class.ilCloudException.php.

◆ SERVICE_NOT_ACTIVE

const ilCloudException::SERVICE_NOT_ACTIVE = 1003

◆ UNKNONW_EXCEPTION

const ilCloudException::UNKNONW_EXCEPTION = -1

Definition at line 16 of file class.ilCloudException.php.

◆ UPLOAD_FAILED

const ilCloudException::UPLOAD_FAILED = 2401

◆ UPLOAD_FAILED_MAX_FILESIZE

const ilCloudException::UPLOAD_FAILED_MAX_FILESIZE = 2402

Definition at line 30 of file class.ilCloudException.php.

Referenced by ilCloudFileTree\uploadFileToService().


The documentation for this class was generated from the following file: