-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTERNAL: stacktrace all exceptions #840
Conversation
μλμ κ°μ΄ λ¨μνκ² νλ©΄ μ΄λ»κ² λλμ? @Override
public synchronized Throwable getCause() {
return !exceptions.isEmpty() ? exceptions.get(0) : null;
}
@Override
public StackTraceElement[] getStackTrace() {
return exceptions.stream()
.map(Throwable::getStackTrace)
.flatMap(Arrays::stream)
.toArray(StackTraceElement[]::new);
}
@Override
public void printStackTrace(PrintStream s) {
exceptions.forEach((e) -> e.printStackTrace(s));
}
@Override
public void printStackTrace(PrintWriter s) {
exceptions.forEach((e) -> e.printStackTrace(s));
} |
@oliviarla |
@uhm0311
κΈ°μ‘΄μλ λ΄λΆμ λ΄κΈ΄ Exceptionλ€μ μ€ννΈλ μ΄μ€κ° μμ΄ CompositeException μ체μ μ€ννΈλ μ΄μ€λ§ λ°νλμμ΅λλ€.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2μ°¨, μ§λ¬Έμ λλ€.
src/main/java/net/spy/memcached/internal/CompositeException.java
Outdated
Show resolved
Hide resolved
0b102a0
to
cce2682
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3μ°¨ 리뷰 μ견μ λλ€.
exceptions.add(new OperationException(OperationErrorType.SERVER, "msg1")); | ||
exceptions.add(new OperationException(OperationErrorType.CLIENT, "msg2")); | ||
|
||
logger.error("failed to get", new CompositeException(exceptions)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ΄ λ‘κ±°λ μλ° ν΄λΌμ΄μΈνΈ λ΄λΆμ ꡬνλ λ‘κ±°λ₯Ό μ¬μ©ν κ²μ
λλ€.
log4j μμ‘΄μ±μ μ΄λ―Έ ν¬ν¨λμ΄ μμΌλ log4jμ λ‘κ±°λ ν λ² μ¬μ©ν΄λ΄
μλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log4j μ¬μ©νλ ν μ€νΈλ μΆκ°νμ΅λλ€.
super(ExceptionMessageFactory.createCompositeMessage(exceptions)); | ||
if (exceptions.size() > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ¬μ΄μ Empty Line μΆκ°
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line κ°μ κ²½μ°μλ μ ν΄μ Έμλ λ£°μ΄ μμλμ?
κ°λ
μ± μ’μ보μ΄κ² μ λλ¦λλ‘ μμ ν΄λμμ΅λλ€.
π Related Issue
β¨οΈ What I did