File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ class Exception extends \Exception
8
8
const PROPERTIES_REQUIRED = 1 ;
9
9
const UNDEFINED_NESTED_NAME = 2 ;
10
10
const DEEP_NESTING = 3 ;
11
+ const RESOLVE_FAILED = 4 ;
11
12
}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ private function getRefProvider()
131
131
/**
132
132
* @param string $referencePath
133
133
* @return Ref
134
- * @throws InvalidValue
134
+ * @throws Exception
135
135
*/
136
136
public function resolveReference ($ referencePath )
137
137
{
@@ -194,6 +194,10 @@ public function resolveReference($referencePath)
194
194
$ this ->setResolutionScope ($ url );
195
195
if (null === $ refResolver ) {
196
196
$ rootData = $ rootResolver ->getRefProvider ()->getSchemaData ($ url );
197
+ if ($ rootData === false ) {
198
+ throw new Exception ("Failed to resolve $ url " , Exception::RESOLVE_FAILED );
199
+ }
200
+
197
201
$ refResolver = new RefResolver ($ rootData );
198
202
$ refResolver ->rootResolver = $ rootResolver ;
199
203
$ refResolver ->refProvider = $ this ->refProvider ;
You can’t perform that action at this time.
0 commit comments