Skip to content

A simple reproduction of instance finalize callback not called when exception happens

Notifications You must be signed in to change notification settings

fs-eire/node-reproduce-instance-cb-not-called

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple reproduction of instance finalize callback not called when exception happens

Reproduce steps:

  • npm ci

  • node a.js

    TestData constructor
    TestData destructor
    
  • node b.js

    TestData constructor
    C:\code\node-reproduce-instance-cb-not-called\a.js:3
    throw new Error('This is a test error')
    ^
    
    Error: This is a test error
        at Object.<anonymous> (C:\code\node-reproduce-instance-cb-not-called\a.js:3:7)
        at Module._compile (node:internal/modules/cjs/loader:1565:14)
        at Object..js (node:internal/modules/cjs/loader:1708:10)
        at Module.load (node:internal/modules/cjs/loader:1318:32)
        at Function._load (node:internal/modules/cjs/loader:1128:12)
        at TracingChannel.traceSync (node:diagnostics_channel:322:14)
        at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
        at node:internal/main/run_main_module:36:49
    
    Node.js v22.12.0
    

    ( No TestData destructor is outputed )

About

A simple reproduction of instance finalize callback not called when exception happens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published