js: Throw GObject.NotImplementedError when requiring overriding
Since version 1.50.0, gjs defines GObject.NotImplementedError for throwing errors when a "virtual" method that requires a subclass implementation is not defined. So use this instead of a generic JS Error in such cases. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/549
This commit is contained in:
@ -122,7 +122,7 @@ var SlidingControl = class {
|
||||
}
|
||||
|
||||
_getSlide() {
|
||||
throw new Error('getSlide() must be overridden');
|
||||
throw new GObject.NotImplementedError(`_getSlide in ${this.constructor.name}`);
|
||||
}
|
||||
|
||||
_updateSlide() {
|
||||
|
Reference in New Issue
Block a user