fix(js): Run error callback on terminate
fix(js): Run error callback on terminate

Co-authored-by: Daniel Edler <943adc63bcd712faff97d8fda5f0d4b9d035aa41@users.noreply.github.com>

mapequation/infomap,mapequation/infomap,mapequation/infomap,mapequation/infomap