now shows fatal error message (if possible)
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
<?php
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
/**
|
||||
* PHP Sandbox: https://github.com/MightyPork/php-sandbox
|
||||
*/
|
||||
|
||||
ini_set('log_errors', false);
|
||||
ini_set('display_errors', true);
|
||||
ini_set('display_startup_errors', true);
|
||||
ini_set('display_not_found_reason', true);
|
||||
ini_set('display_exceptions', true);
|
||||
ini_set('html_errors', false);
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
// --- Handle config ---
|
||||
|
||||
+3
-3
@@ -45,12 +45,12 @@
|
||||
}
|
||||
|
||||
// eval server-side
|
||||
$.post('?js=1', { code: editor.getSession().getValue() }, function (res, status, jqXHR) {
|
||||
$.post('?js=1', {code: editor.getSession().getValue()}, function (res, status, jqXHR) {
|
||||
var mem = jqXHR.getResponseHeader("X-Memory-Usage") || "",
|
||||
rendertime = jqXHR.getResponseHeader("X-Rendertime") || "";
|
||||
|
||||
if (mem || rendertime) {
|
||||
$('.statusbar .runtime-info').text('Memory usage: '+ mem + ' MB, Rendertime: ' + rendertime + 'ms');
|
||||
$('.statusbar .runtime-info').text('Memory usage: ' + mem + ' MB, Rendertime: ' + rendertime + 'ms');
|
||||
} else {
|
||||
$('.statusbar .runtime-info').text('');
|
||||
}
|
||||
@@ -65,7 +65,7 @@
|
||||
};
|
||||
|
||||
handleAjaxError = function (event, jqxhr, settings, exception) {
|
||||
$('div.output').html("<em>Error occured while posting your code.</em>");
|
||||
$('div.output').html("<em>Error occured while posting your code.</em>" + jqxhr.responseText);
|
||||
};
|
||||
|
||||
initializeAce = function () {
|
||||
|
||||
+11
-1
@@ -1,6 +1,6 @@
|
||||
body, textarea, input {
|
||||
font-size: 12px;
|
||||
font-family: monospace "Source Code Pro";
|
||||
font-family: "Source Code Pro", monospace;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -77,6 +77,16 @@ a {
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
.output h1 {
|
||||
margin: .5em 0 0 0;
|
||||
}
|
||||
|
||||
.output p, .output pre {
|
||||
margin: .5em 0;
|
||||
-webkit-margin-before: 0;
|
||||
-webkit-margin-after: 0;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
border-right: 4px solid #686860;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user