static log_relative_errors(handler) {
        let active = process.env['c_relative_errors_active'] === true;
        if (!active) {
            process.env['c_relative_errors_active'] = true;
            FileSystem.readFile(
                process.argv[1].split('\\').join('/'),
                {
                    encoding: 'utf8',
                },
                (error, compiled) => {
                    const compiler = new Compiler({
                        __proto_instance: true,
                    });

                    // Log self read error
                    if (error) {
                        console.log(
                            'Failed to read self content on log_relative_errors() call:'
                        );
                        return console.log(error);
                    }

                    // Bind uncaughtException handler
                    process.on('uncaughtException', (error, origin) =>
                        this._on_exception(compiler, error, compiled, handler)
                    );

                    // Bind unhandledRejection handler
                    process.on('unhandledRejection', (reason, promise) =>
                        promise.catch((error) =>
                            this._on_exception(
                                compiler,
                                error,
                                compiled,
                                handler
                            )
                        )
                    );
                }
            );
        }
    }
/**
     * Binds global error exception handler which will log relative error traces
     */
Binds global error exception handler which will log relative error traces
Binds global error exception handler which will log relative error traces
static log_relative_errors(handler) {
        let active = process.env['c_relative_errors_active'] === true;
        if (!active) {
            process.env['c_relative_errors_active'] = true;
            FileSystem.readFile(
                process.argv[1].split('\\').join('/'),
                {
                    encoding: 'utf8',
                },
                (error, compiled) => {
                    const compiler = new Compiler({
                        __proto_instance: true,
                    });
                    if (error) {
                        console.log(
                            'Failed to read self content on log_relative_errors() call:'
                        );
                        return console.log(error);
                    }
                    process.on('uncaughtException', (error, origin) =>
                        this._on_exception(compiler, error, compiled, handler)
                    );
                    process.on('unhandledRejection', (reason, promise) =>
                        promise.catch((error) =>
                            this._on_exception(
                                compiler,
                                error,
                                compiled,
                                handler
                            )
                        )
                    );
                }
            );
        }
    }
static log_relative_errors ( handler ) { let active = process . env [ 'c_relative_errors_active' ] === true ; if ( ! active ) { process . env [ 'c_relative_errors_active' ] = true ; FileSystem . readFile ( process . argv [ 1 ] . split ( '\\' ) . join ( '/' ) , { encoding : 'utf8' , } , ( error , compiled ) => { const compiler = new Compiler ( { __proto_instance : true , } ) ; if ( error ) { console . log ( 'Failed to read self content on log_relative_errors() call:' ) ; return console . log ( error ) ; } process . on ( 'uncaughtException' , ( error , origin ) => this . _on_exception ( compiler , error , compiled , handler ) ) ; process . on ( 'unhandledRejection' , ( reason , promise ) => promise . catch ( ( error ) => this . _on_exception ( compiler , error , compiled , handler ) ) ) ; } ) ; } }
Binds global error exception handler which will log relative error traces
Binds global error exception handler which will log relative error traces
// Log self read error // Bind uncaughtException handler // Bind unhandledRejection handler