mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Address error validation comment
This commit is contained in:
parent
8f2cca5b0f
commit
d54d0ea7b3
2 changed files with 7 additions and 6 deletions
|
|
@ -336,5 +336,9 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
|
|||
}
|
||||
});
|
||||
|
||||
Method::finaliseInitialization();
|
||||
// Check for any errors found while we were initialising the SDK Methods.
|
||||
if (!empty(Method::getErrors())) {
|
||||
throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors()));
|
||||
}
|
||||
|
||||
$http->start();
|
||||
|
|
|
|||
|
|
@ -309,11 +309,8 @@ class Method
|
|||
return $this;
|
||||
}
|
||||
|
||||
// Throw any errors that were found during initialization
|
||||
public static function finaliseInitialization(): void
|
||||
public static function getErrors(): array
|
||||
{
|
||||
if (!empty(self::$errors)) {
|
||||
throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, self::$errors));
|
||||
}
|
||||
return self::$errors;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue