We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4178379 commit 19898d5Copy full SHA for 19898d5
src/Exceptions/UnknownRecordType.php
@@ -0,0 +1,7 @@
1
+<?php
2
+
3
+namespace Scriptotek\Marc\Exceptions;
4
5
+class UnknownRecordType extends \RuntimeException
6
+{
7
+}
src/Record.php
@@ -5,6 +5,7 @@
use File_MARC_Record;
use File_MARC_Reference;
use Scriptotek\Marc\Exceptions\RecordNotFound;
8
+use Scriptotek\Marc\Exceptions\UnknownRecordType;
9
10
class Record
11
{
@@ -97,7 +98,7 @@ public function getType()
97
98
case 'y': // Serial item holdings
99
return Marc21::HOLDINGS;
100
default:
- throw new \ErrorException('Unknown record type.');
101
+ throw new UnknownRecordType();
102
}
103
104
0 commit comments