PageSourceSearch

https://app.cmo.hu/js/startup.js?v=22069

js cmo.hu collected 2026-10-01 16:27:09 UTC 2,901 bytes, 112 lines download raw bytes

1window.appStartupErrors = [];
2
3window.addAppStartupError = function (message) {
4    const normalizedMessage =
5        message instanceof Error
6            ? message.stack || message.message
7            : String(message);
8
9    window.appStartupErrors.push(normalizedMessage);
10
11    const errorDiv = document.getElementById('cache-error');
12
13    if (errorDiv) {
14        errorDiv.innerText = window.getStartupDiagnosticsText?.()
15            ?? window.appStartupErrors.join('\n\n');
16    }
17};
18
19window.reportStartupErrorToSentry = function (
20    error,
21    source,
22    extra = {}
23) {
24    if (!window.Sentry) {
25        return;
26    }
27
28    const normalizedError =
29        error instanceof Error
30            ? error
31            : new Error(String(error));
32
33    window.Sentry.withScope(scope => {
34        scope.setTag('error_type', 'blazor_startup_failure');
35        scope.setTag('startup_source', source);
36        scope.setLevel('error');
37
38        scope.setContext('startup', {
39            clientVersion: 'CLIENT_VERSION',
40            collectedErrors: [...window.appStartupErrors]
41        });
42
43        if (window.getBrowserDetails) {
44            scope.setContext('browser_diagnostics', window.getBrowserDetails());
45        }
46
47        Object.entries(extra).forEach(([key, value]) => {
48            scope.setExtra(key, value);
49        });
50
51        window.Sentry.captureException(normalizedError);
52    });
53};
54
55const originalConsoleError = console.error.bind(console);
56
57console.error = function (...args) {
58    originalConsoleError(...args);
59
60    const message = args
61        .map(arg => {
62            if (arg instanceof Error) {
63                return arg.stack || arg.message;
64            }
65
66            if (typeof arg === 'object') {
67                try {
68                    return JSON.stringify(arg);
69                }
70                catch {
71                    return String(arg);
72                }
73            }
74
75            return String(arg);
76        })
77        .join(' ');
78
79    window.addAppStartupError(message);
80};
81
82window.addEventListener('error', event => {
83    window.addAppStartupError(
84        `${event.message}\n${event.filename}:${event.lineno}:${event.colno}`
85    );
86
87    // Sentry captures ordinary window errors automatically.
88    // Do not manually capture them here, otherwise duplicate events may appear.
89});
90
91window.addEventListener('unhandledrejection', event => {
92    window.addAppStartupError(
93        event.reason?.stack ||
94        event.reason?.message ||
95        String(event.reason)
96    );
97
98    // Sentry also captures unhandled rejections automatically.
99});
100
101window.scriptLoadFailed = function (src) {
102    const error = new Error(
103        `Nem sikerült betölteni a következő fájlt: ${src}`
104    );
105
106    window.addAppStartupError(error);
107
108    window.reportStartupErrorToSentry(error, 'script_load', {
109        failedScript: src,
110        pageUrl: window.location.href
111    });
112};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.