mirror of
https://github.com/splitbrain/dokuwiki-plugin-sync.git
synced 2025-07-24 10:01:41 +00:00
29 lines
662 B
PHP
29 lines
662 B
PHP
<?php
|
|
|
|
namespace dokuwiki\plugin\sync;
|
|
|
|
/**
|
|
* Class SyncException
|
|
*
|
|
* @package dokuwiki\plugin\sync
|
|
*/
|
|
class SyncException extends \Exception {
|
|
|
|
/**
|
|
* SyncException constructor.
|
|
* @param string $message
|
|
* @param int $code
|
|
* @param object|null $previous
|
|
*/
|
|
public function __construct($message = '', $code = 0, $previous = null) {
|
|
// translate error messages
|
|
$plugin = plugin_load('admin', 'sync');
|
|
$msg = $plugin->getLang($message);
|
|
if($msg) $message = $msg;
|
|
|
|
if($code === -403) $message = $plugin->getLang('autherr');
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
}
|