Files
directus/packages/drive/src/exceptions/DriverNotSupported.ts
WoLfulus 42393951e0 Test runners for storage drivers (#4716)
* add tests to drive

* add azure test runner

* add gcs test runner

* add s3 test runner

* quick changes

* Re-add npm run dev

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-04-09 15:40:12 -04:00

18 lines
403 B
TypeScript

import { RuntimeException } from 'node-exceptions';
export class DriverNotSupported extends RuntimeException {
public driver!: string;
private constructor(message: string, code?: number) {
super(message, code);
}
public static driver(name: string): DriverNotSupported {
const exception = new this(`Driver ${name} is not supported`, 400);
exception.driver = name;
return exception;
}
}