Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
AtomicSponge committed May 27, 2024
1 parent e90c31c commit a43f798
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions electron/lib/ScriptBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class ScriptBuffer extends EventEmitter {
JSON.stringify(ScriptBuffer.#buffer, null, 2), {
encoding: <BufferEncoding>encoding })
} catch (error:any) {
throw error
throw new ScriptBufferError(error.message, this.saveJSON)
}
}

Expand All @@ -114,7 +114,7 @@ export class ScriptBuffer extends EventEmitter {
fs.writeFileSync(filePath, data, {
encoding: <BufferEncoding>encoding })
} catch (error:any) {
throw error
throw new ScriptBufferError(error.message, this.saveLog)
}
}

Expand All @@ -140,7 +140,9 @@ export class ScriptBuffer extends EventEmitter {
this.#trim()
try {
this.#save()
} catch (error:any) { throw error }
} catch (error:any) {
throw new ScriptBufferError(error.message, this.#write)
}
this.emit('script-buffer-updated')
}

Expand Down

0 comments on commit a43f798

Please sign in to comment.