You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-27 23:28:38 +02:00
Desktop: Turn old plugin deprecation notices into errors
This commit is contained in:
@ -143,8 +143,12 @@ export default class Plugin {
|
||||
return this.viewControllers_[handle];
|
||||
}
|
||||
|
||||
public deprecationNotice(goneInVersion: string, message: string) {
|
||||
logger.warn(`"${this.id}": DEPRECATION NOTICE: ${message} This will stop working in version ${goneInVersion}.`);
|
||||
public deprecationNotice(goneInVersion: string, message: string, isError: boolean = false) {
|
||||
if (isError) {
|
||||
throw new Error(`"${this.id}": No longer supported: ${message} (deprecated since version ${goneInVersion})`);
|
||||
} else {
|
||||
logger.warn(`"${this.id}": DEPRECATION NOTICE: ${message} This will stop working in version ${goneInVersion}.`);
|
||||
}
|
||||
}
|
||||
|
||||
public emitMessage(message: any) {
|
||||
|
Reference in New Issue
Block a user