Fix bug in Exception() and clearify the error message. Closes #100

This commit is contained in:
Mark Schouten 2016-08-09 22:59:29 +02:00
parent b04b4dd864
commit 4b5d4b02c9

View file

@ -240,7 +240,7 @@ class RRSet {
public function addRecord($content, $disabled = FALSE, $setptr = FALSE) { public function addRecord($content, $disabled = FALSE, $setptr = FALSE) {
foreach ($this->records as $record) { foreach ($this->records as $record) {
if ($record->content == $content) { if ($record->content == $content) {
throw Exception("Record already exists"); throw new Exception($this->name."/".$this->type." has duplicate records.");
} }
} }