Skip to content

Instantly share code, notes, and snippets.

@dhaley
Created February 1, 2013 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaley/4694396 to your computer and use it in GitHub Desktop.
Save dhaley/4694396 to your computer and use it in GitHub Desktop.
Emacs debugger info for flycheck parsing bug with phpcs checker
Debugger entered--Lisp error: (error "Unexpected root element nil")
signal(error ("Unexpected root element nil"))
error("Unexpected root element %s" nil)
(if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root)))
(let* ((root (flycheck-parse-xml-string output))) (if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root))) (-flatten (-keep (function flycheck-parse-checkstyle-file-node) (cddr root))))
flycheck-parse-checkstyle("\nFatal error: Call to undefined function iconv() in /opt/local/lib/php/PHP/CodeSniffer/Reports/Checkstyle.php on line 75\n" php-phpcs #<buffer foo3.php>)
funcall(flycheck-parse-checkstyle "\nFatal error: Call to undefined function iconv() in /opt/local/lib/php/PHP/CodeSniffer/Reports/Checkstyle.php on line 75\n" php-phpcs #<buffer foo3.php>)
(let* ((parser (or (flycheck-checker-error-parser checker) (quote flycheck-parse-output-with-patterns))) (errors (funcall parser output checker buffer))) (let ((list errors) (it-index 0)) (while list (let ((it (car list))) (progn (or (and (vectorp it) (>= ... 7) (memq ... cl-struct-flycheck-error-tags)) (error "%s accessing a non-%s" (quote flycheck-error-buffer) (quote flycheck-error))) (let* ((v it)) (aset v 1 buffer)))) (setq it-index (1+ it-index)) (setq list (cdr list)))) (flycheck-sanitize-errors errors))
flycheck-parse-output("\nFatal error: Call to undefined function iconv() in /opt/local/lib/php/PHP/CodeSniffer/Reports/Checkstyle.php on line 75\n" php-phpcs #<buffer foo3.php>)
(let* ((checker (process-get process :flycheck-checker)) (exit-status (process-exit-status process)) (output (flycheck-get-output process)) (parsed-errors (flycheck-parse-output output checker (current-buffer))) (errors (flycheck-relevant-errors parsed-errors))) (flycheck-post-syntax-check-cleanup process) (if flycheck-mode (progn (setq flycheck-current-errors (flycheck-sort-errors (append errors flycheck-current-errors nil))) (flycheck-report-errors flycheck-current-errors) (if (and (/= exit-status 0) (not errors)) (progn (message "Checker %s returned non-zero exit code %s, but no errors fromoutput: %s\nChecker definition probably flawed." checker exit-status output) (flycheck-report-status "?"))) (if (eq (current-buffer) (window-buffer)) (progn (flycheck-show-error-at-point))) (let ((next-checker (flycheck-get-next-checker-for-buffer checker))) (if next-checker (flycheck-start-checker next-checker) (run-hooks (quote flycheck-after-syntax-check-hook)))))))
flycheck-finish-syntax-check(#<process flycheck>)
(lambda nil (flycheck-finish-syntax-check process))()
funcall((lambda nil (flycheck-finish-syntax-check process)))
(if debug-on-error (funcall body) (condition-case err (funcall body) (error (flycheck-post-syntax-check-cleanup process) (flycheck-report-status "!") (signal (car err) (cdr err)))))
(let ((body (function (lambda nil (flycheck-finish-syntax-check process))))) (if debug-on-error (funcall body) (condition-case err (funcall body) (error (flycheck-post-syntax-check-cleanup process) (flycheck-report-status "!") (signal (car err) (cdr err))))))
(save-current-buffer (set-buffer (process-buffer process)) (let ((body (function (lambda nil (flycheck-finish-syntax-check process))))) (if debug-on-error (funcall body) (condition-case err (funcall body) (error (flycheck-post-syntax-check-cleanup process) (flycheck-report-status "!") (signal (car err) (cdr err)))))))
(progn (save-current-buffer (set-buffer (process-buffer process)) (let ((body (function (lambda nil (flycheck-finish-syntax-check process))))) (if debug-on-error (funcall body) (condition-case err (funcall body) (error (flycheck-post-syntax-check-cleanup process) (flycheck-report-status "!") (signal (car err) (cdr err))))))))
(if (and (memq (process-status process) (quote (signal exit))) (buffer-live-p (process-buffer process))) (progn (save-current-buffer (set-buffer (process-buffer process)) (let ((body (function (lambda nil ...)))) (if debug-on-error (funcall body) (condition-case err (funcall body) (error (flycheck-post-syntax-check-cleanup process) (flycheck-report-status "!") (signal ... ...))))))))
flycheck-handle-signal(#<process flycheck> "exited abnormally with code 255\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment