Files
pnoker 03e6ddb0b3 docs(model): fix base builder param types and document mcp tool dto
- BaseBuilder: correct param/return type names (EntityVO -> BaseVO, etc.)
  across 8 conversion methods
- McpToolDefinitionDTO: document fields and the nested Annotations hints
  and Metadata (tool id, permission code, risk level)
- ExceptionUtil: fill placeholder param/return for
  getNotAvailableServiceMessage
2026-07-09 19:16:30 +08:00
..
2026-05-26 00:30:11 +08:00

DC3 Common Exception

Overview

dc3-common-exception defines the standard exception types and exception utility class for the IoT DC3 platform. All services and modules use these exceptions to signal business errors consistently.

Module Information

  • Group ID: io.github.pnoker
  • Artifact ID: dc3-common-exception
  • Version: 2026.5.22

Key Components

Exception Types

Exception Usage
ServiceException General service-level business error
UpdateException Entity update failure
AddException Entity add failure
DeleteException Entity delete failure
NotFoundException Entity or resource not found
JsonException JSON serialization/deserialization error
AuthException Authentication/authorization failure
DuplicateException Duplicate entity conflict

Utilities

  • ExceptionUtil — Helper methods for wrapping and rethrowing exceptions with context
  • ExceptionConstant — Standard exception message strings (e.g., UTILITY_CLASS)

Usage

throw new NotFoundException("Driver not found for device: " + deviceId);
throw new AddException("Failed to add driver: " + entityBO.getServiceName());

Build Instructions

mvn -s ../../.mvn/settings.xml clean package

Used by all dc3-common-* service modules and dc3-center-* services.

License

Copyright 2016-present the IoT DC3 original author or authors.

Licensed under the GNU Affero General Public License v3.0 (AGPL 3.0)