Skip to content
This repository
Browse code

Added error handler

  • Loading branch information...
commit 2357f42c13e03909897041ccc7dc2240c053091d 1 parent 16943a6
Ignacio Rivas sabarasaba authored

Showing 1 changed file with 11 additions and 1 deletion. Show diff stats Hide diff stats

  1. +11 1 example/public/js/main.js
12 example/public/js/main.js
@@ -31,7 +31,7 @@ $(document).ready(function(){
31 31
32 32 if (l > 0) {
33 33 for (var x = 0; x < l; x++) {
34   - if (e.errors[x].type === 'error') {
  34 + if (e.errors[x].type === 'Error') {
35 35 list.append('<li><span class="message-error">' + e.errors[x].type + '</span>: ' + e.errors[x].rule + '. ' + e.errors[x].message + '.</li>');
36 36 } else {
37 37 list.append('<li><span class="message-info">' + e.errors[x].type + '</span>: ' + e.errors[x].rule + '. ' + e.errors[x].message + '.</li>');
@@ -55,6 +55,16 @@ $(document).ready(function(){
55 55 console.log('error');
56 56 console.log(textStatus);
57 57 console.log(errorThrown);
  58 +
  59 + var p = $(".lint-results").append('<div class="results-container"><p></p></div>').find('p');
  60 + p.append('Error: ' + textStatus + '. ErrorThrown: ' + errorThrown);
  61 +
  62 + $('.lint-loading').hide();
  63 +
  64 + $('.lint-results').fadeIn('fast', function() {
  65 + $('.lint-results').show();
  66 + $('.lint-reset').show();
  67 + });
58 68 }
59 69 });
60 70 });

0 comments on commit 2357f42

Please sign in to comment.
Something went wrong with that request. Please try again.