/**
 * Errors - 自定义错误类
 */

/**
 * 工具错误基类
 */
class ToolError extends Error {
  constructor(toolName, message) {
    super(`[${toolName}] ${message}`);
    this.name = 'ToolError';
    this.toolName = toolName;
  }
}

/**
 * 配置错误
 */
class ConfigError extends ToolError {
  constructor(toolName, message) {
    super(toolName, `Configuration Error: ${message}`);
    this.name = 'ConfigError';
  }
}

/**
 * 验证错误
 */
class ValidationError extends ToolError {
  constructor(toolName, message) {
    super(toolName, `Validation Error: ${message}`);
    this.name = 'ValidationError';
  }
}

module.exports = {
  ToolError,
  ConfigError,
  ValidationError
};
