<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">

    <title>Error test</title>
    <meta name="description" content="">
</head>
<body>

<h1>Error test</h1>


<script type="text/javascript">
    (function(callback) {
        var ab = document.createElement('script');
        ab.type = 'text/javascript'; ab.async = true;
        ab.onload = ab.onreadystatechange = callback;
        // this should match your copy of the compiled notifier.js or notifier.min.js
        //ab.src = (("https:" == document.location.protocol) ? "https://ssljscdn" : "http://jscdn") + ".airbrake.io/notifier.min.js";
        ab.src = "/static/scripts/notifier.js";
        var p = document.getElementsByTagName('script')[0];
        p.parentNode.insertBefore(ab, p);
    }(function () {
        Airbrake.setGuessFunctionName(true);
        Airbrake.setHost('api.appenlight.com');
        console.log(Airbrake)
        // insert your public api key
        Airbrake.setKey('{{ request.registry.settings.get('appenlight.public_api_key') }}');
        Airbrake.setEnvironment('production');
        Airbrake.setErrorDefaults({
            url: document.URL,
            component: "",
            action: "",
            user: "someuser",
        });
    }));
    // example error
    setTimeout(function(){
        try {
            cvxzvcxzcvxv + 263
        } catch (e) {
            window.Airbrake.captureException(e);
        }
        console.log('foo');
    },2000);




</script>

</body>
</html>
