ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAtomQueryException Class Reference

Class ilAtomQueryException. More...

+ Inheritance diagram for ilAtomQueryException:
+ Collaboration diagram for ilAtomQueryException:

Data Fields

const DB_ATOM_GENERAL = 10900
 
const DB_ATOM_LOCK_TABLE_NONEXISTING = 10901
 
const DB_ATOM_LOCK_WRONG_LEVEL = 10902
 
const DB_ATOM_CLOSURE_WRONG_FORMAT = 10903
 
const DB_ATOM_ISO_WRONG_LEVEL = 10904
 
const DB_ATOM_ANO_NOT_AVAILABLE = 10905
 
const DB_ATOM_LOCK_NO_TABLE = 10906
 
const DB_ATOM_CLOSURE_NONE = 10907
 
const DB_ATOM_CLOSURE_ALREADY_SET = 10908
 
const DB_ATOM_IDENTICAL_TABLES = 10909
 
- Data Fields inherited from ilDatabaseException
const DB_GENERAL = 10000
 

Protected Member Functions

 tranlateException ($code)
 
- Protected Member Functions inherited from ilDatabaseException
 tranlateException ($code)
 

Additional Inherited Members

- Public Member Functions inherited from ilDatabaseException
 __construct ($a_message, $a_code=self::DB_GENERAL)
 ilDatabaseException constructor. More...
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 A message isn't optional as in build in class Exception. More...
 

Detailed Description

Member Function Documentation

◆ tranlateException()

ilAtomQueryException::tranlateException (   $code)
protected
Parameters
$code
Returns
string

Definition at line 27 of file exception.ilAtomQueryException.php.

References $code, and $message.

28  {
29  $message = 'An undefined Exception occured';
30  switch ($code) {
31  case static::DB_ATOM_GENERAL:
32  $message = 'An undefined exception in ilAtomQuery has occured';
33  break;
34  case static::DB_ATOM_LOCK_TABLE_NONEXISTING:
35  $message = 'Table locks only work with existing tables';
36  break;
37  case static::DB_ATOM_LOCK_WRONG_LEVEL:
38  $message = 'The current Isolation-level does not support the desired lock-level. use ilAtomQuery::LOCK_READ or ilAtomQuery::LOCK_WRITE';
39  break;
40  case static::DB_ATOM_CLOSURE_WRONG_FORMAT:
41  $message = 'Please provide a Closure with your database-actions by adding with ilAtomQuery->addQueryClosure(function($ilDB) use ($my_vars) { $ilDB->doStuff(); });';
42  break;
43  case static::DB_ATOM_ISO_WRONG_LEVEL:
44  $message = 'This isolation-level is currently unsupported';
45  break;
46  case static::DB_ATOM_ANO_NOT_AVAILABLE:
47  $message = 'Anomaly not available';
48  break;
49  case static::DB_ATOM_LOCK_NO_TABLE:
50  $message = 'ilAtomQuery needs at least one table to be locked';
51  break;
52  case static::DB_ATOM_CLOSURE_NONE:
53  $message = 'There is no Closure available';
54  break;
55  case static::DB_ATOM_CLOSURE_ALREADY_SET:
56  $message = 'Only one Closure per ilAtomQuery is possible';
57  break;
58  case static::DB_ATOM_IDENTICAL_TABLES:
59  $message = 'A Table and/or alias-name can only be locked once';
60  break;
61  }
62 
63  return 'ilAtomQuery: ' . $message . '. ';
64  }
$code
Definition: example_050.php:99
catch(Exception $e) $message

Field Documentation

◆ DB_ATOM_ANO_NOT_AVAILABLE

const ilAtomQueryException::DB_ATOM_ANO_NOT_AVAILABLE = 10905

◆ DB_ATOM_CLOSURE_ALREADY_SET

const ilAtomQueryException::DB_ATOM_CLOSURE_ALREADY_SET = 10908

◆ DB_ATOM_CLOSURE_NONE

const ilAtomQueryException::DB_ATOM_CLOSURE_NONE = 10907

◆ DB_ATOM_CLOSURE_WRONG_FORMAT

const ilAtomQueryException::DB_ATOM_CLOSURE_WRONG_FORMAT = 10903

◆ DB_ATOM_GENERAL

const ilAtomQueryException::DB_ATOM_GENERAL = 10900

Definition at line 11 of file exception.ilAtomQueryException.php.

◆ DB_ATOM_IDENTICAL_TABLES

const ilAtomQueryException::DB_ATOM_IDENTICAL_TABLES = 10909

◆ DB_ATOM_ISO_WRONG_LEVEL

◆ DB_ATOM_LOCK_NO_TABLE

const ilAtomQueryException::DB_ATOM_LOCK_NO_TABLE = 10906

◆ DB_ATOM_LOCK_TABLE_NONEXISTING

const ilAtomQueryException::DB_ATOM_LOCK_TABLE_NONEXISTING = 10901

Definition at line 12 of file exception.ilAtomQueryException.php.

Referenced by ilTableLock\check().

◆ DB_ATOM_LOCK_WRONG_LEVEL

const ilAtomQueryException::DB_ATOM_LOCK_WRONG_LEVEL = 10902

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