1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-07-03 00:58:12 +02:00

Add details when failed parsing

This commit is contained in:
Hubert depesz Lubaczewski
2019-12-17 20:09:28 +01:00
parent f838622a1f
commit c20c5db4ea
3 changed files with 5 additions and 1 deletions

View File

@ -235,7 +235,7 @@ sub index {
$self->app->log->info( $EVAL_ERROR );
# leave...
return $self->render( message => q|Failed to parse your plan| );
return $self->render( 'message' => q|Failed to parse your plan:|, 'details' => $EVAL_ERROR );
}
# save to database

View File

@ -138,6 +138,7 @@ footer a:hover {color:#e80}
div.message { border: 2px solid #f00; padding: 0.5em; text-align: center; background: #600; }
div.message p.message { font-weight: bold; font-size: 2em; color: #ff0; padding: 0; margin: 0; margin-bottom: 1em; }
div.message p.details { background: #300; font-weight: normal; font-size: 1.5em; color: #cc0; padding: 10px; margin-left: 32px; margin-right: 32px; margin-bottom: 1em; text-align: left; border: 1px solid #ff0; }
div.message p.messageSimple { margin-bottom: 0.5em; margin-top: 0.5em; }
div.message p.hint { color: #ff0; padding: 0; margin: 0; }
div.message p.hint a { color: #ff0; }

View File

@ -9,6 +9,9 @@
% if ( stash( 'message' ) ) {
<div class="message">
<p class="message"><%= stash( 'message' ) =%></p>
% if ( stash( 'details' ) ) {
<p class="details"><%= stash( 'details' ) =%></p>
% }
<p class="hint">You might want to <a href="<%= url_for 'contact' %>">contact</a> me if you think that the problem is on <a href="http://explain.depesz.com/">explain.depesz.com</a> side.</p>
</div>
% }