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