Bug 1806130 [wpt PR 37556] - URL: hash/search roundtripping with opaque paths, a...
[gecko.git] / remote / shared / RemoteError.sys.mjs
blob2e326d5d1835a31a947909248ae4f9f3ebc289c6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /**
6  * Base class for all remote protocol errors.
7  */
8 export class RemoteError extends Error {
9   get isRemoteError() {
10     return true;
11   }
13   /**
14    * Convert to a serializable object. Should be implemented by subclasses.
15    */
16   toJSON() {
17     throw new Error("Not implemented");
18   }