mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
specific invalid state reasons
This commit is contained in:
parent
f49f5ffbaf
commit
3994999306
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user