Skip to content

Commit f3c5091

Browse files
committed
Add exception for better observability
1 parent ce41558 commit f3c5091

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: bow-meta-manager
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: [ "main" ]
66
pull_request:
7-
branches: [ "master" ]
7+
branches: [ "main" ]
88

99
permissions:
1010
contents: read

src/MetaManagerConfiguration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
use Bow\View\View;
66
use Tintin\Tintin;
77
use Bow\Configuration\Configuration;
8-
use Bow\Configuration\Loader as Config;
8+
use Bow\Configuration\Loader as ApplicationConfigurationLoader;
99

1010
class MetaManagerConfiguration extends Configuration
1111
{
1212
/**
1313
* @inheritDoc
1414
*/
15-
public function create(Config $config): void
15+
public function create(ApplicationConfigurationLoader $config): void
1616
{
1717
$meta = (array) $config['meta'];
1818

@@ -33,7 +33,7 @@ public function run(): void
3333
$tintin = View::getInstance()->getEngine();
3434

3535
if (!$tintin instanceof Tintin) {
36-
throw new \ErrorException("Please use bowphp/tintin as the default view engine");
36+
throw new MetaManagerException("Please use bowphp/tintin as the default view engine");
3737
}
3838

3939
$tintin->directive('meta', function (array $attribute = []) use ($tintin) {

src/MetaManagerException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Bow\MetaManager;
4+
5+
class MetaManagerException extends \Exception
6+
{
7+
}

0 commit comments

Comments
 (0)