Skip to content

Commit 24a6eb1

Browse files
committed
11.2.1; Bug Fix Replaced MultiLinedException
1 parent d4178cb commit 24a6eb1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "anshu.krishna5@gmail.com"
1010
}
1111
],
12-
"version": "11.2",
12+
"version": "11.2.1",
1313
"minimum-stability": "stable",
1414
"require": {
1515
"php": ">=8.1",

src/Func.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22
namespace Krishna\API;
33

4-
use Krishna\DataValidator\MultiLinedException;
4+
use Krishna\DataValidator\ComplexException;
55
use Krishna\DataValidator\ObjectHandler;
66
use Krishna\DataValidator\OutOfBoundAction;
77
use Krishna\DataValidator\Validator;
8+
89
final class Func {
910
use \Krishna\Utilities\StaticOnlyTrait;
1011
private static $definition = null;
@@ -23,9 +24,9 @@ public static function set_signature(array $signature, OutOfBoundAction $on_out_
2324
try {
2425
self::$signature = new Validator($signature, $on_out_of_bound);
2526
if(!is_a(self::$signature->struct, ObjectHandler::class)) {
26-
throw new MultiLinedException('Invalid signature; It has to be a object structure');
27+
throw new ComplexException('Invalid signature; It has to be a object structure');
2728
}
28-
} catch(MultiLinedException $ex) {
29+
} catch(ComplexException $ex) {
2930
Server::error_from($ex->getInfo(), __METHOD__);
3031
}
3132
}
@@ -71,7 +72,7 @@ public static function execute(string $base_path, array &$request) {
7172
foreach(self::$auth as $handler) {
7273
$test = $handler->authenticate($query, $request['func']);
7374
if(!$test->valid) {
74-
Server::error($test->value, StatusType::UNAUTH_REQ);
75+
Server::error($test->error, StatusType::UNAUTH_REQ);
7576
}
7677
}
7778

0 commit comments

Comments
 (0)