Skip to content

Commit

Permalink
Fix ng lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
gjuggler committed Feb 21, 2020
1 parent e06ac73 commit 2d059a1
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions ui/src/app/utils/cluster-initializer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ const DEFAULT_MAX_DELETE_COUNT = 2;
const DEFAULT_MAX_RESUME_COUNT = 2;
const DEFAULT_MAX_SERVER_ERROR_COUNT = 5;

export class ClusterInitializationFailedError extends Error {
public readonly cluster: Cluster;

constructor(message: string, cluster?: Cluster) {
super(message);
Object.setPrototypeOf(this, ClusterInitializationFailedError.prototype);

this.name = 'ClusterInitializationFailedError';
this.cluster = cluster;
}
}

export class ExceededActionCountError extends ClusterInitializationFailedError {
constructor(message, cluster?: Cluster) {
super(message, cluster);
Object.setPrototypeOf(this, ExceededActionCountError.prototype);

this.name = 'ExceededActionCountError';
}
}

export class ExceededErrorCountError extends ClusterInitializationFailedError {
constructor(message, cluster?: Cluster) {
super(message, cluster);
Object.setPrototypeOf(this, ExceededErrorCountError.prototype);

this.name = 'ExceededErrorCountError';
}
}

export interface ClusterInitializerOptions {
// Core options. Most callers should provide these.
Expand Down Expand Up @@ -270,33 +299,3 @@ export class ClusterInitializer {
this.currentDelay = Math.min(this.currentDelay * 1.3, this.maxDelay);
}
}

export class ClusterInitializationFailedError extends Error {
public readonly cluster: Cluster;

constructor(message: string, cluster?: Cluster) {
super(message);
Object.setPrototypeOf(this, ClusterInitializationFailedError.prototype);

this.name = 'ClusterInitializationFailedError';
this.cluster = cluster;
}
}

export class ExceededActionCountError extends ClusterInitializationFailedError {
constructor(message, cluster?: Cluster) {
super(message, cluster);
Object.setPrototypeOf(this, ExceededActionCountError.prototype);

this.name = 'ExceededActionCountError';
}
}

export class ExceededErrorCountError extends ClusterInitializationFailedError {
constructor(message, cluster?: Cluster) {
super(message, cluster);
Object.setPrototypeOf(this, ExceededErrorCountError.prototype);

this.name = 'ExceededErrorCountError';
}
}

0 comments on commit 2d059a1

Please sign in to comment.