mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-24 21:33:16 +08:00
修复 子线程出错时没有打印详细信息的问题
This commit is contained in:
parent
3d6c2812c6
commit
fbe2df406a
@ -281,12 +281,13 @@ public class StardustConsole extends AbstractConsole {
|
||||
data = getStackTrace((Throwable) data);
|
||||
}
|
||||
if (options != null && options.length > 0) {
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
Object option = options[i];
|
||||
StringBuilder sb = new StringBuilder(data == null ? "" : data.toString());
|
||||
for (Object option : options) {
|
||||
if (option instanceof Throwable) {
|
||||
options[i] = getStackTrace((Throwable) option);
|
||||
sb.append(getStackTrace((Throwable) option)).append(" ");
|
||||
}
|
||||
}
|
||||
data = sb.toString();
|
||||
}
|
||||
super.error(data, options);
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import android.util.Log;
|
||||
|
||||
import com.stardust.autojs.runtime.exception.ScriptException;
|
||||
|
||||
import java.util.Formatter;
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/5/1.
|
||||
*/
|
||||
@ -63,4 +65,5 @@ public abstract class AbstractConsole implements Console {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user