<div>
    <script type="text/javascript">
        (function () {
            "use strict";

            try {
                [{$field.title}]
            } catch (e) {
                setTimeout(function () {
                    var msg = "You have an error in your custom javascript code:<br />\n" + e;

                    if (Object.isUndefined(idoit.Notify)) {
                        alert(msg);
                    } else {
                        idoit.Notify.error(msg, {sticky: true});
                    }
                }, 100);
            }
        })();
    </script>
</div>