mirror of
https://github.com/pmmp/BedrockProtocol.git
synced 2025-02-23 16:16:15 +00:00
23 lines
728 B
PHP
23 lines
728 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of BedrockProtocol.
|
|
* Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
|
|
*
|
|
* BedrockProtocol is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace pocketmine\network\mcpe\protocol;
|
|
|
|
final class PacketDecodeException extends \RuntimeException{
|
|
|
|
public static function wrap(\Throwable $previous, ?string $prefix = null) : self{
|
|
return new self(($prefix !== null ? $prefix . ": " : "") . $previous->getMessage(), 0, $previous);
|
|
}
|
|
}
|