@@ -458,6 +458,7 @@ public static Record transportOneRecord(RecordSender recordSender,
458
458
if (columnValue .equals (nullFormat )) {
459
459
columnValue = null ;
460
460
}
461
+ String errorTemplate = "类型转换错误, 无法将[%s] 转换为[%s]" ;
461
462
switch (type ) {
462
463
case STRING :
463
464
columnGenerated = new StringColumn (columnValue );
@@ -468,7 +469,7 @@ public static Record transportOneRecord(RecordSender recordSender,
468
469
}
469
470
catch (Exception e ) {
470
471
throw new IllegalArgumentException (String .format (
471
- "类型转换错误, 无法将[%s] 转换为[%s]" , columnValue ,
472
+ errorTemplate , columnValue ,
472
473
"LONG" ));
473
474
}
474
475
break ;
@@ -478,7 +479,7 @@ public static Record transportOneRecord(RecordSender recordSender,
478
479
}
479
480
catch (Exception e ) {
480
481
throw new IllegalArgumentException (String .format (
481
- "类型转换错误, 无法将[%s] 转换为[%s]" , columnValue ,
482
+ errorTemplate , columnValue ,
482
483
"DOUBLE" ));
483
484
}
484
485
break ;
@@ -488,7 +489,7 @@ public static Record transportOneRecord(RecordSender recordSender,
488
489
}
489
490
catch (Exception e ) {
490
491
throw new IllegalArgumentException (String .format (
491
- "类型转换错误, 无法将[%s] 转换为[%s]" , columnValue ,
492
+ errorTemplate , columnValue ,
492
493
"BOOLEAN" ));
493
494
}
494
495
@@ -518,7 +519,7 @@ public static Record transportOneRecord(RecordSender recordSender,
518
519
}
519
520
catch (Exception e ) {
520
521
throw new IllegalArgumentException (String .format (
521
- "类型转换错误, 无法将[%s] 转换为[%s]" , columnValue ,
522
+ errorTemplate , columnValue ,
522
523
"DATE" ));
523
524
}
524
525
break ;
0 commit comments