-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils, converters): 更新查询路径处理与转换器逻辑
- 更新 `QueryJsonHelper` 中的键分隔符处理逻辑。 - 调整 `UserAuditorConverters` 文档注释及内部转换器逻辑。 - 优化 `QueryHelper` 的 SQL 构建过程。 - 添加 `JsonPointerException` 异常类处理 JSON 指针错误。 - 扩展 `LoggerRequest` 构造方法与日志细节。 - 修正 `AbstractDatabase` 中的转换器调用。 - 更新 `JsonException` 以处理更广泛的异常类型。 - 增强 `ContextUtils` 和 `BeanUtils` 方法功能。
- Loading branch information
Showing
10 changed files
with
184 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
boot/platform/src/main/java/com/plate/boot/commons/exception/JsonPointerException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.plate.boot.commons.exception; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Represents an exception that occurs when attempting to access a non-existent path within a JSON structure. | ||
* This exception extends {@link JsonException}, specifically catering to errors involving JSON pointer operations | ||
* which fail due to invalid or unreachable paths within the JSON data. | ||
* | ||
* <p> | ||
* This class provides constructors to initialize the exception with a descriptive message and an underlying | ||
* {@link IOException} that led to the JSON pointer error, allowing for detailed diagnostics of the issue. | ||
* Additionally, it includes a static factory method for conveniently creating instances with an error message | ||
* and the associated {@linkplain IOException}. | ||
* </p> | ||
*/ | ||
public class JsonPointerException extends JsonException { | ||
|
||
/** | ||
* Constructs a new {@code JsonPointerException} with a specified error message and an {@link IOException} cause. | ||
* This exception is thrown when attempting to access a non-existent path within a JSON structure using a JSON pointer, | ||
* indicating that the referenced location could not be found or accessed due to structural issues within the JSON data. | ||
* | ||
* @param message A human-readable description of the error, explaining the context of the JSON pointer operation that failed. | ||
* @param exception The {@link IOException} that triggered this exception, providing additional context or details about the failure. | ||
*/ | ||
public JsonPointerException(String message, IllegalArgumentException exception) { | ||
super(message, exception); | ||
} | ||
|
||
/** | ||
* Creates a new instance of {@code JsonPointerException} with a specified error message and an {@link IOException}. | ||
* This static method serves as a convenience factory for initializing {@code JsonPointerException} instances, | ||
* encapsulating both a descriptive error message and the original {@linkplain IOException} that caused the failure. | ||
* It is particularly useful when the exception is due to an issue encountered while accessing a JSON structure, | ||
* such as a malformed JSON pointer or inaccessible data. | ||
* | ||
* @param message A human-readable message describing the error context. This should explain the problem encountered with the JSON pointer operation. | ||
* @param exception The {@link IOException} that represents the underlying cause of the JSON pointer error. It provides deeper insight into why the operation failed. | ||
* @return A new {@code JsonPointerException} instance initialized with the given message and {@code IOException}. | ||
*/ | ||
public static JsonPointerException withError(String message, IllegalArgumentException exception) { | ||
return new JsonPointerException(message, exception); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters