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
88 const PROPERTIES_REQUIRED = 1 ;
99 const UNDEFINED_NESTED_NAME = 2 ;
1010 const DEEP_NESTING = 3 ;
11+ const RESOLVE_FAILED = 4 ;
1112}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ private function getRefProvider()
131131 /**
132132 * @param string $referencePath
133133 * @return Ref
134- * @throws InvalidValue
134+ * @throws Exception
135135 */
136136 public function resolveReference ($ referencePath )
137137 {
@@ -194,6 +194,10 @@ public function resolveReference($referencePath)
194194 $ this ->setResolutionScope ($ url );
195195 if (null === $ refResolver ) {
196196 $ rootData = $ rootResolver ->getRefProvider ()->getSchemaData ($ url );
197+ if ($ rootData === false ) {
198+ throw new Exception ("Failed to resolve $ url " , Exception::RESOLVE_FAILED );
199+ }
200+
197201 $ refResolver = new RefResolver ($ rootData );
198202 $ refResolver ->rootResolver = $ rootResolver ;
199203 $ refResolver ->refProvider = $ this ->refProvider ;
You can’t perform that action at this time.
0 commit comments