Created
October 21, 2019 12:42
-
-
Save tarto-dev/767650fc69a7eb6924de951b84446bd3 to your computer and use it in GitHub Desktop.
Perfect error handler :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, Drupal) { | |
'use strict'; | |
/** | |
* @type {Drupal~behavior#ben_stackOverLowl} | |
*/ | |
Drupal.behaviors.ben_stackOverLowl = { | |
attach: function (context, settings) { | |
try { | |
// Ton code ici | |
} catch (e) { | |
window.location.href = "https://stackoverflow.com/search?q=[js]+[drupal]" + e.message; | |
} | |
} | |
}; | |
}(jQuery, Drupal)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment