specific invalid state reasons

This commit is contained in:
jesopo 2022-03-28 10:05:09 +00:00
parent f49f5ffbaf
commit 3994999306

View File

@ -68,7 +68,7 @@ export class ReportPoll {
60_000 // a minute in milliseconds
);
} else {
throw new InvalidStateError();
throw new InvalidStateError("cannot start an already started poll");
}
}
public stop() {
@ -76,7 +76,7 @@ export class ReportPoll {
clearInterval(this.interval);
this.interval = null;
} else {
throw new InvalidStateError();
throw new InvalidStateError("cannot stop a poll that hasn't started");
}
}
}