mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-01 19:00:20 +02:00
Expect and document a more concrete exception type
As was proposed during review.
This commit is contained in:
@@ -32,7 +32,7 @@ class StreamHandler extends AbstractProcessingHandler
|
|||||||
private $dirCreated;
|
private $dirCreated;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource|string $stream If a missing path can't be created, an Exception will be thrown on first write
|
* @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write
|
||||||
* @param string|int $level The minimum logging level at which this handler will be triggered
|
* @param string|int $level The minimum logging level at which this handler will be triggered
|
||||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
||||||
* @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
|
* @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write)
|
||||||
|
@@ -203,7 +203,7 @@ class StreamHandlerTest extends TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->expectException(\Exception::class);
|
$this->expectException(\UnexpectedValueException::class);
|
||||||
$this->expectExceptionMessage('There is no existing directory at');
|
$this->expectExceptionMessage('There is no existing directory at');
|
||||||
|
|
||||||
$handler->handle($this->getRecord());
|
$handler->handle($this->getRecord());
|
||||||
|
Reference in New Issue
Block a user