@athenna/database
Version:
The Athenna database handler for SQL/NoSQL.
20 lines (19 loc) • 602 B
JavaScript
/**
* @athenna/database
*
* (c) João Lenon <lenon@athenna.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { Exception } from '@athenna/common';
export class WrongMethodException extends Exception {
constructor(wrong, right) {
const message = `The method ${wrong} should not be used to perform operations using this type of data.`;
super({
message,
code: 'E_WRONG_METHOD_ERROR',
help: `Instead try using the ${right} method.`
});
}
}