mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-23 01:22:12 +03:00
fix: cleanup repo
This commit is contained in:
parent
6244a67972
commit
2a7a84e655
5
app/.env.testing
Normal file
5
app/.env.testing
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
PUBLIC_API_BASE_URL=https://test.app.gitbutler.com/
|
||||||
|
PUBLIC_POSTHOG_API_KEY=
|
||||||
|
PUBLIC_CHAIN_API=https://data-test.gitbutler.com/chain/
|
||||||
|
PUBLIC_SENTRY_ENVIRONMENT=
|
||||||
|
PUBLIC_TESTING=true
|
@ -3,10 +3,8 @@ import { error as logErrorToFile } from 'tauri-plugin-log-api';
|
|||||||
import type { NavigationEvent } from '@sveltejs/kit';
|
import type { NavigationEvent } from '@sveltejs/kit';
|
||||||
|
|
||||||
function myErrorHandler({ error, event }: { error: any; event: NavigationEvent }) {
|
function myErrorHandler({ error, event }: { error: any; event: NavigationEvent }) {
|
||||||
if (typeof window.__TAURI_IPC__ === 'function') {
|
console.error(error.message + '\n' + error.stack);
|
||||||
console.error(error.message + '\n' + error.stack);
|
logErrorToFile(error.toString());
|
||||||
logErrorToFile(error.toString());
|
|
||||||
}
|
|
||||||
console.error('An error occurred on the client side:', error, event);
|
console.error('An error occurred on the client side:', error, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,9 +19,7 @@ export const handleError = handleErrorWithSentry(myErrorHandler);
|
|||||||
*/
|
*/
|
||||||
const originalUnhandledHandler = window.onunhandledrejection;
|
const originalUnhandledHandler = window.onunhandledrejection;
|
||||||
window.onunhandledrejection = (event: PromiseRejectionEvent) => {
|
window.onunhandledrejection = (event: PromiseRejectionEvent) => {
|
||||||
if (typeof window.__TAURI_IPC__ === 'function') {
|
logErrorToFile('Unhandled exception: ' + event?.reason + ' ' + event?.reason?.sourceURL);
|
||||||
logErrorToFile('Unhandled exception: ' + event?.reason + ' ' + event?.reason?.sourceURL);
|
console.log('Unhandled exception', event.reason);
|
||||||
console.log('Unhandled exception', event.reason);
|
originalUnhandledHandler?.bind(window)(event);
|
||||||
originalUnhandledHandler?.bind(window)(event);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user