Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit ff35a7c

Browse files
authored
Merge pull request #3 from modulusphp/feature/partial-exception
Feature/partial exception
2 parents 91182f0 + ecdfdd2 commit ff35a7c

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Exceptions/PartialNotFoundException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ class PartialNotFoundException extends Exception
1414
*/
1515
public function __construct(string $view)
1616
{
17+
$position = count(debug_backtrace()) == 21 ? 14 : 13;
18+
19+
if (isset(debug_backtrace()[$position])) {
20+
$args = debug_backtrace()[$position];
21+
22+
foreach ($args as $key => $value) {
23+
$this->{$key} = $value;
24+
}
25+
}
26+
1727
$this->message = '"' . $view . '" does not exist.';
1828
}
1929
}

composer.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"name": "modulusphp/directives",
33
"description": "Directives for modulusPHP",
4-
"version": "1.9.1",
4+
"version": "1.9.2",
55
"license": "MIT",
66
"type": "package",
7-
"authors": [
8-
{
9-
"name": "Donald Pakkies",
10-
"email": "donaldpakkies@gmail.com"
11-
}
12-
],
7+
"authors": [{
8+
"name": "Donald Pakkies",
9+
"email": "donaldpakkies@gmail.com"
10+
}],
1311
"require": {
1412
"atlantisphp/medusa": "^1.0"
1513
},

0 commit comments

Comments
 (0)