Skip to content

Commit

Permalink
Throw more error details in exception
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Feb 12, 2016
1 parent 3d057c3 commit 6412b30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LazyRecord/Schema/SchemaBase.php
Expand Up @@ -165,7 +165,7 @@ public function getReferenceSchemas($recursive = true)
continue;
}
if (! class_exists($class,true)) {
throw new RuntimeException("Foreign schema class $class not found." );
throw new RuntimeException("Foreign schema class '$class' not found in schema {$this}." );
}


Expand All @@ -187,7 +187,7 @@ public function getReferenceSchemas($recursive = true)
$schemas = array_merge($schemas, $fs->getReferenceSchemas(false));
}
} else {
throw new InvalidArgumentException("Foreign schema class $class is not a SchemaDeclare class");
throw new InvalidArgumentException("Foreign schema class '$class' is not a SchemaDeclare class");
}

}
Expand Down

0 comments on commit 6412b30

Please sign in to comment.