3 * Bacula® - The Network Backup Solution
4 * Baculum - Bacula web interface
6 * Copyright (C) 2013-2015 Marcin Haba
8 * The main author of Baculum is Marcin Haba.
9 * The main author of Bacula is Kern Sibbald, with contributions from many
10 * others, a complete list can be found in the file AUTHORS.
12 * You may use this file and others of this release according to the
13 * license defined in the LICENSE file, which includes the Affero General
14 * Public License, v3.0 ("AGPLv3") and some additional permissions and
15 * terms pursuant to its AGPLv3 Section 7.
17 * Bacula® is a registered trademark of Kern Sibbald.
21 const ERROR_NO_ERRORS = 0;
22 const ERROR_INVALID_COMMAND = 1;
23 const ERROR_INTERNAL_ERROR = 100;
25 const MSG_ERROR_NO_ERRORS = '';
26 const MSG_ERROR_INVALID_COMMAND = 'Invalid command.';
27 const MSG_ERROR_INTERNAL_ERROR = 'Internal error.';
30 class DatabaseError extends GenericError {
31 const ERROR_DB_CONNECTION_PROBLEM = 2;
32 const ERROR_WRITE_TO_DB_PROBLEM = 3;
34 const MSG_ERROR_DB_CONNECTION_PROBLEM = 'Problem with connection to database.';
35 const MSG_ERROR_WRITE_TO_DB_PROBLEM = 'Error during write to database.';
38 class BconsoleError extends GenericError {
40 const ERROR_BCONSOLE_CONNECTION_PROBLEM = 4;
41 const ERROR_INVALID_DIRECTOR = 5;
43 const MSG_ERROR_BCONSOLE_CONNECTION_PROBLEM = 'Problem with connection to bconsole.';
44 const MSG_ERROR_INVALID_DIRECTOR = 'Invalid director.';
47 class AuthorizationError extends GenericError {
49 const ERROR_AUTHORIZATION_TO_WEBGUI_PROBLEM = 6;
51 const MSG_ERROR_AUTHORIZATION_TO_WEBGUI_PROBLEM = 'Problem with authorization to Baculum WebGUI.';
54 class ClientError extends GenericError {
55 const ERROR_CLIENT_DOES_NOT_EXISTS = 10;
57 const MSG_ERROR_CLIENT_DOES_NOT_EXISTS = 'Client with inputed clientid does not exist.';
60 class StorageError extends GenericError {
61 const ERROR_STORAGE_DOES_NOT_EXISTS = 20;
63 const MSG_ERROR_STORAGE_DOES_NOT_EXISTS = 'Storage with inputed storageid does not exist.';
66 class VolumeError extends GenericError {
67 const ERROR_VOLUME_DOES_NOT_EXISTS = 30;
69 const MSG_ERROR_VOLUME_DOES_NOT_EXISTS = 'Volume with inputed mediaid does not exist.';
72 class PoolError extends GenericError {
73 const ERROR_POOL_DOES_NOT_EXISTS = 40;
74 const ERROR_NO_VOLUMES_IN_POOL_TO_UPDATE = 41;
76 const MSG_ERROR_POOL_DOES_NOT_EXISTS = 'Pool with inputed poolid does not exist.';
77 const MSG_NO_VOLUMES_IN_POOL_TO_UPDATE= 'Pool with inputed poolid does not contain any volume to update.';
80 class JobError extends GenericError {
81 const ERROR_JOB_DOES_NOT_EXISTS = 50;
82 const ERROR_INVALID_JOBLEVEL = 51;
83 const ERROR_FILESETID_DOES_NOT_EXISTS = 52;
84 const ERROR_CLIENTID_DOES_NOT_EXISTS = 53;
85 const ERROR_STORAGEID_DOES_NOT_EXISTS = 54;
86 const ERROR_POOLID_DOES_NOT_EXISTS = 55;
87 const ERROR_INVALID_RPATH = 56;
88 const ERROR_INVALID_WHERE_OPTION = 57;
89 const ERROR_INVALID_REPLACE_OPTION = 58;
91 const MSG_ERROR_JOB_DOES_NOT_EXISTS = 'Job with inputed jobid does not exist.';
92 const MSG_ERROR_INVALID_JOBLEVEL = 'Inputed job level is invalid.';
93 const MSG_ERROR_FILESETID_DOES_NOT_EXISTS = 'FileSet resource with inputed filesetid does not exist.';
94 const MSG_ERROR_CLIENTID_DOES_NOT_EXISTS = 'Client with inputed clientid does not exist.';
95 const MSG_ERROR_STORAGEID_DOES_NOT_EXISTS = 'Storage with inputed storageid does not exist.';
96 const MSG_ERROR_POOLID_DOES_NOT_EXISTS = 'Pool with inputed poolid does not exist.';
97 const MSG_ERROR_INVALID_RPATH = 'Inputed rpath for restore is invalid. Proper format is b2[0-9]+.';
98 const MSG_ERROR_INVALID_WHERE_OPTION = 'Inputed "where" option is invalid.';
99 const MSG_ERROR_INVALID_REPLACE_OPTION = 'Inputed "replace" option is invalid.';
102 class FileSetError extends GenericError {
103 const ERROR_FILESET_DOES_NOT_EXISTS = 60;
105 const MSG_ERROR_FILESET_DOES_NOT_EXISTS = 'FileSet with inputed filesetid does not exist.';
108 class BVFSError extends GenericError {
109 const ERROR_JOB_DOES_NOT_EXISTS = 70;
110 const ERROR_INVALID_PATH = 71;
112 const MSG_ERROR_JOB_DOES_NOT_EXISTS = 'Job with inputed jobid does not exist.';
113 const MSG_ERROR_INVALID_PATH = 'Inputed path for restore is invalid. Proper format is b2[0-9]+.';