Skip to content

Commit 96c176d

Browse files
committed
Merge branch 'release/0.9.13'
2 parents bb31bd2 + 49b2531 commit 96c176d

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

.version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"strategy": "semver",
33
"major": 0,
44
"minor": 9,
5-
"patch": 12,
5+
"patch": 13,
66
"build": 0
77
}

src/Mvc/Application.php

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -272,36 +272,35 @@ public function executeController( array $parameters, string $requestName = '' )
272272
$controller = $parts[ 0 ];
273273
$method = $parts[ 1 ];
274274

275-
$controller = Factory::create( $this, $controller );
276-
277-
if( !method_exists( $controller, $method ) )
275+
try
278276
{
279-
throw new MissingMethod( "Method '$method'' not found." );
280-
}
277+
$controller = Factory::create( $this, $controller );
281278

282-
if( empty( $requestName ) )
283-
{
284-
$request = new Request();
285-
}
286-
else
287-
{
288-
$request = $this->getRequest( $requestName );
279+
if( !method_exists( $controller, $method ) )
280+
{
281+
throw new MissingMethod( "Method '$method'' not found." );
282+
}
289283

290-
try
284+
if( empty( $requestName ) )
291285
{
292-
$request->processPayload( $request->getJsonPayload() );
286+
$request = new Request();
293287
}
294-
catch( Exception $e )
288+
else
295289
{
296-
Log::error( $e->getMessage() );
290+
$request = $this->getRequest( $requestName );
291+
292+
try
293+
{
294+
$request->processPayload( $request->getJsonPayload() );
295+
}
296+
catch( Exception $e )
297+
{
298+
Log::error( $e->getMessage() );
299+
}
297300
}
298-
}
299301

300-
$request->setRouteParameters( $parameters );
302+
$request->setRouteParameters( $parameters );
301303

302-
// Catch NotFound exceptions and redirect to 404
303-
try
304-
{
305304
return $controller->$method( $request );
306305
}
307306
catch( NotFound $e )
@@ -323,13 +322,15 @@ public function executeController( array $parameters, string $requestName = '' )
323322
{
324323
Log::error( "Exception in controller: " . $e->getMessage() );
325324

326-
Event::emit( new Http500(
327-
$parameters['route'] ?? 'unknown',
328-
get_class( $e ),
329-
$e->getMessage(),
330-
$e->getFile(),
331-
$e->getLine()
332-
) );
325+
Event::emit(
326+
new Http500(
327+
$parameters['route'] ?? 'unknown',
328+
get_class( $e ),
329+
$e->getMessage(),
330+
$e->getFile(),
331+
$e->getLine()
332+
)
333+
);
333334

334335
$this->onCrash(
335336
[

versionlog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 0.9.13 2025-11-27
2+
13
## 0.9.12 2025-11-27
24

35
## 0.9.11 2025-11-27

0 commit comments

Comments
 (0)