mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Add AbstractError.Builder.setDescriptiveEnText(String, Exception)
This commit is contained in:
parent
1122bf394c
commit
75b1d8ce13
1 changed files with 12 additions and 0 deletions
|
@ -23,6 +23,7 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.jivesoftware.smack.util.ExceptionUtil;
|
||||||
import org.jivesoftware.smack.util.Objects;
|
import org.jivesoftware.smack.util.Objects;
|
||||||
import org.jivesoftware.smack.util.PacketUtil;
|
import org.jivesoftware.smack.util.PacketUtil;
|
||||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||||
|
@ -150,6 +151,17 @@ public class AbstractError {
|
||||||
return getThis();
|
return getThis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public B setDescriptiveEnText(String descriptiveEnText, Exception exception) {
|
||||||
|
StringBuilder sb = new StringBuilder(512);
|
||||||
|
sb.append(descriptiveEnText)
|
||||||
|
.append('\n');
|
||||||
|
|
||||||
|
String stacktrace = ExceptionUtil.getStackTrace(exception);
|
||||||
|
sb.append(stacktrace);
|
||||||
|
|
||||||
|
return setDescriptiveEnText(sb.toString());
|
||||||
|
}
|
||||||
|
|
||||||
public B setTextNamespace(String textNamespace) {
|
public B setTextNamespace(String textNamespace) {
|
||||||
this.textNamespace = textNamespace;
|
this.textNamespace = textNamespace;
|
||||||
return getThis();
|
return getThis();
|
||||||
|
|
Loading…
Reference in a new issue