change exception message

This commit is contained in:
javacs3
2019-07-13 17:25:18 +08:00
parent 31f812cf94
commit fe3520c685
@@ -17,7 +17,7 @@ export class SerializeAddon implements ITerminalAddon {
public serialize(rows?: number): string {
// TODO: Add frontground/background color support later
if (!this._terminal) {
throw new Error('No terminal found!');
throw new Error('Cannot use addon until it has been loaded');
}
const buffer = this._terminal.buffer;
const length = Math.max(0, Math.min((rows === undefined ? buffer.length : rows), buffer.length));