fix: improve error handling and logging for extractor and cleaner
- Load .env file in main process using dotenv - Add detailed console logging for debugging - Add validation for ERP configuration before extraction - Improve error display in UI with selectable text - Add stack trace logging for better debugging
This commit is contained in:
@@ -3,6 +3,14 @@ import { join } from 'path'
|
||||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||
import icon from '../../resources/icon.png?asset'
|
||||
import { registerIpcHandlers } from './ipc'
|
||||
import * as dotenv from 'dotenv'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { dirname, resolve } from 'path'
|
||||
|
||||
// Load environment variables from .env file
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
dotenv.config({ path: resolve(__dirname, '../../.env') })
|
||||
|
||||
function createWindow(): void {
|
||||
// Create the browser window.
|
||||
|
||||
Reference in New Issue
Block a user