<ips:template parameters="$title, $message, $code, $backtrace, $showContinueUrl=false, $retryUrl=false" />
{{$mr = isset( \IPS\Request::i()->mr ) ? json_decode( urldecode( base64_decode( \IPS\Request::i()->mr ) ), true ) : array();}}
<div class='ipsMessage ipsMessage--error'>
	<span class="ipsMessage--code">{$code}</span>
	{lang="$message"}
	<br />
	{{if \is_array($mr) and \count($mr)}}
	<small>{lang="location"}: {lang="step" sprintf="\IPS\Dispatcher::i()->step ?: 1"} {$mr[0]}. {lang="application"}: {expression="ucfirst($mr[1])"}</small>
	{{endif}}
</div>
<div class='i-padding_3'>
    <pre>{$backtrace|raw}</pre>
</div>
<div class="ipsButtons">
	{{if $retryUrl}}
	<a href="$retryUrl" class='ipsButton' data-action="redirectContinue">{lang="retry"}</a>
	{{endif}}
	{{if $showContinueUrl}}
	<a href="$showContinueUrl" class='ipsButton' data-action="redirectContinue">{lang="continue"}</a>
	{{endif}}
</div>