/**
 * Shared Errors - 通用错误类
 */

class ValidationError extends Error {
  constructor(module, message) {
    super(`[${module}] ${message}`);
    this.name = 'ValidationError';
    this.module = module;
  }
}

class ConfigurationError extends Error {
  constructor(module, message) {
    super(`[${module}] ${message}`);
    this.name = 'ConfigurationError';
    this.module = module;
  }
}

module.exports = {
  ValidationError,
  ConfigurationError
};
