import { warn } from './debug/logger';

// Custom exception
export class TamiaError extends Error {
	constructor(message) {
		super(message);
		if (DEBUG) {
			warn(...arguments);
		}
		this.name = this.constructor.name;
		this.message = message;
		Error.captureStackTrace(this, this.constructor.name);
	}
}

/**
 * Custom exception
 */
export class TamiaError extends Error {
	constructor(message) {
		super(message);
		this.name = this.constructor.name;
		this.message = message;
		Error.captureStackTrace(this, this.constructor.name);
	}
}

remove unnecessary console.warn.