add try catch

This commit is contained in:
2023-04-01 22:20:53 +02:00
parent 5038381b65
commit 826147e3f7
4 changed files with 21 additions and 7 deletions

View File

@@ -39,7 +39,9 @@
}
else if(data == "admin"){
umami.trackEvent('Admin login', { type: 'adminlogin', code: kod });
try{
umami.trackEvent('Admin login', { type: 'adminlogin', code: kod });
} catch(e) {}
$.post("index.php",
{
kod: kod,
@@ -51,13 +53,17 @@
});
}
else{
umami.trackEvent('Bad code', { type: 'badcode', code: kod });
try{
umami.trackEvent('Bad code', { type: 'badcode', code: kod });
} catch(e) {}
$("#error").fadeIn();
}
});
});
$("#back").click(function() {
umami.trackEvent('Back button', { type: 'loginback' });
try{
umami.trackEvent('Back button', { type: 'loginback' });
} catch(e) {}
$("#secondQuestion").fadeOut("slow", function(){
$("#firstQuestion").fadeIn("slow", function(){
$("#kod").focus();
@@ -67,7 +73,9 @@
$("#send").click(function() {
inic = $("#ini").val();
listeners = $("#listeners").val();
umami.trackEvent('Normal login ', { type: 'login', code: kod, listeners: listeners, initials: inic });
try{
umami.trackEvent('Normal login ', { type: 'login', code: kod, listeners: listeners, initials: inic });
} catch(e) {}
$.post("index.php",
{
kod: kod,