forked from Islandora/tuque
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RepositoryException.php
42 lines (35 loc) · 1.04 KB
/
RepositoryException.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* @file
* Contains all of the exceptions thrown by Tuque.
*/
/**
* The top level exception for the Islandora Fedora API
*/
class RepositoryException extends Exception {}
/**
* This is thrown when there is an error parsing XML.
*/
class RepositoryXmlError extends RepositoryException {
public $errors;
/**
* Same as the default exception constructor except it takes another
* parameter errors, this is the error returned by the xml parser.
*/
function __construct($message, $code, $errors, $previous = NULL) {
parent::__construct($message, $code, $previous);
$this->errors = $errors;
}
}
/**
* This is thrown when a bad arguement is passed.
*/
class RepositoryBadArguementException extends RepositoryException {}
/**
* This is thrown from the relationships class when something goes wrong
*/
class RepositoryRelationshipsException extends RepositoryException {}
/**
* This is thrown when a datastream already exists and attempted to be ingested.
*/
class DatastreamExistsException extends RepositoryException{}