mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 16:56:08 +08:00
22 lines
482 B
JavaScript
22 lines
482 B
JavaScript
|
|
||
|
// "Source" is a hack so that the error matches the ones used by node-imap
|
||
|
|
||
|
class IMAPConnectionNotReadyError extends Error {
|
||
|
constructor(funcName) {
|
||
|
super(`${funcName} - You must call connect() first.`);
|
||
|
this.source = 'socket';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class IMAPConnectionEndedError extends Error {
|
||
|
constructor(msg = "The IMAP Connection was ended.") {
|
||
|
super(msg);
|
||
|
this.source = 'socket';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
IMAPConnectionNotReadyError,
|
||
|
IMAPConnectionEndedError,
|
||
|
};
|