Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $errorLog = $_GET['errorLog'];
- $pattern = "/Exception in thread \".*\" java.*\.\s*(.+?)\s*:.*\n.*?\.\s*(.+?)\s*\(\s*(.+?)\s*:\s*(\d+?)\s*\)/";
- preg_match_all($pattern, $errorLog, $matches, PREG_SET_ORDER);
- echo '<ul>';
- foreach ($matches as $match) {
- $line = htmlspecialchars($match[4]);
- $exception = htmlspecialchars($match[1]);
- $filename = htmlspecialchars($match[3]);
- $method = htmlspecialchars($match[2]);
- echo "<li>line <strong>{$line}</strong> - <strong>{$exception}</strong> in <em>{$filename}:{$method}</em></li>";
- }
- echo '</ul>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement