master
面包骑士 2024-08-20 14:25:42 +08:00
parent 00e6b97192
commit ed1842ed49
1 changed files with 2 additions and 0 deletions

View File

@ -689,9 +689,11 @@ public class Convert {
* @return
*/
public static String str (Object obj, String charsetName) {
System.out.println(obj);
try{
return str(obj, Charset.forName(charsetName));
}catch (Exception exception){
System.out.println("字符转换异常: [{"+obj+"}-{"+charsetName+"}] -> {"+exception.getMessage()+"}");
log.error("字符转换异常: [{}-{}] -> {}",obj,charsetName,exception.getMessage(),exception);
throw new RuntimeException(exception);
}