throw only on failure
This commit is contained in:
parent
eae62c4f4e
commit
9485af1962
3 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,9 @@ export default class NostrSubprocess {
|
|||
|
||||
this.childProcess.on("exit", (code) => {
|
||||
this.log(ERROR, `nostr subprocess exited with code ${code}`)
|
||||
if (!code) {
|
||||
return
|
||||
}
|
||||
throw new Error(`nostr subprocess exited with code ${code}`)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ export class StorageInterface extends EventEmitter {
|
|||
this.process.on('exit', (code: number) => {
|
||||
this.log(ERROR, `Storage processor exited with code ${code}`);
|
||||
this.isConnected = false;
|
||||
if (!code) {
|
||||
return
|
||||
}
|
||||
throw new Error(`Storage processor exited with code ${code}`)
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,9 @@ export class TlvStorageFactory extends EventEmitter {
|
|||
this.process.on('exit', (code: number) => {
|
||||
this.log(ERROR, `Tlv Storage processor exited with code ${code}`);
|
||||
this.isConnected = false;
|
||||
if (!code) {
|
||||
return
|
||||
}
|
||||
throw new Error(`Tlv Storage processor exited with code ${code}`)
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue