"(pymysql.err.ProgrammingError) (1146, \"Table 'yc-test.popular_card' doesn't exist\")\n[SQL: SELECT popular_card.id AS popular_card_id, popular_card.card_id AS popular_card_card_id, popular_card.weight AS popular_card_weight, popular_card.is_del AS popular_card_is_del, popular_card.created_at AS popular_card_created_at, popular_card.updated_at AS popular_card_updated_at \nFROM popular_card \nWHERE popular_card.card_id = %(card_id_1)s AND popular_card.is_del = %(is_del_1)s \n LIMIT %(param_1)s]\n[parameters: {'card_id_1': 82, 'is_del_1': 0, 'param_1': 1}]\n(Background on this error at: http://sqlalche.me/e/f405)"
ToastUtils.showShort(it.message)
The stack of crash
W: java.util.FormatFlagsConversionMismatchException: Conversion = c, Flags = (
W: at java.util.Formatter$FormatSpecifier.failMismatch(Formatter.java:4398)
W: at java.util.Formatter$FormatSpecifier.checkBadFlags(Formatter.java:3091)
W: at java.util.Formatter$FormatSpecifier.checkCharacter(Formatter.java:3068)
W: at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2818)
W: at java.util.Formatter$FormatSpecifierParser.<init>(Formatter.java:2624)
W: at java.util.Formatter.parse(Formatter.java:2557)
W: at java.util.Formatter.format(Formatter.java:2504)
W: at java.util.Formatter.format(Formatter.java:2458)
W: at java.lang.String.format(String.java:2842)
W: at com.blankj.utilcode.util.ToastUtils.show(ToastUtils.java:251)
W: at com.blankj.utilcode.util.ToastUtils.showShort(ToastUtils.java:141)
ToastUtils.showShort,format异常
原因是服务器在极端的情况下返回的错误信息包含占位符,而ToastUtils的第一个参数为format
The code of bug
对应message为
The stack of crash