<ips:template parameters="$exception, $showContinueUrl=false, $retryUrl=false" />
<div class='ipsMessage ipsMessage_error'>
	<span class="ipsMessage_code">{$exception->getCode()}</span>
	{$exception->getMessage()}
	<br />
	{{if $exception instanceof \IPS\Db\Exception}}
		{{$trace = $exception->getTrace();}}
		{{if $trace[2]['function'] == 'installDatabaseUpdates'}}
			<small>
				{expression="\IPS\ROOT_PATH"}/applications/{$trace[3]['args'][0][1]}/setup/upg_{$trace[2]['args'][0]}/queries.json{{if isset($_SESSION['lastJsonIndex'])}} - query #{$_SESSION['lastJsonIndex']}{{endif}}<br>
				<pre>{{if $exception->query}}{$exception->query}{{else}}{$trace[0]['args'][0]}{{endif}}</pre>
			</small>
		{{else}}
			<small>
				{$trace[1]['file']}::{$trace[1]['line']}<br>
				<pre>{{if $exception->query}}{$exception->query}{{else}}{$trace[0]['args'][0]}{{endif}}</pre>
			</small>
		{{endif}}
	{{else}}
		<small>{$exception->getFile()}::{$exception->getLine()}</small>
	{{endif}}
</div>
{{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}}