Skip to content

Commit

Permalink
Use more generic name for exception to avoid having to change again i…
Browse files Browse the repository at this point in the history
…n the future
  • Loading branch information
TRowbotham committed Jun 21, 2024
1 parent 744b9ee commit 5a6cba1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

- Bump minimum PHP version to 8.1
- Lone surrogate code points are no longer treated differently from other invalid code points
- `\Rowbot\URL\Exception\UConverterException` has been renamed to `\Rowbot\URL\Exception\MbstringException`
- `\Rowbot\URL\String\Exception\UConverterException` has been renamed to `\Rowbot\URL\String\Exception\EncodingException`
- Moved 32-bit tests to GitHub Actions from Appveyor
- `\Rowbot\URL\URL`'s $url and $base parameters now also accept `\Stringable`
- `\Rowbot\URL\URLSearchParams::current()` now returns `null` when the iterator is invalid instead of `['', '']`, which better matches the expected behavior
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

use Rowbot\URL\Exception\URLException;

class MbstringException extends URLException
class EncodingException extends URLException
{
}
4 changes: 2 additions & 2 deletions src/String/Utf8String.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Rowbot\URL\String;

use Rowbot\URL\String\Exception\MbstringException;
use Rowbot\URL\String\Exception\EncodingException;

use function mb_convert_encoding;
use function mb_scrub;
Expand Down Expand Up @@ -36,7 +36,7 @@ public static function transcode(string $string, string $toEncoding, string $fro
mb_substitute_character($substituteChar);

if ($result === false) {
throw new MbstringException(sprintf(
throw new EncodingException(sprintf(
'Transcoding from "%s" to "%s" failed.',
$fromEncoding,
$toEncoding
Expand Down

0 comments on commit 5a6cba1

Please sign in to comment.