{"record":{"id":"26c5fa22603ae810","repo":"pentaho/pentaho-kettle","slug":"message","errorCode":null,"errorMessage":"message","messagePattern":"message","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java","lineNumber":734,"sourceCode":"                  errorFields = sb.toString();\n                }\n                if ( errorText != null ) {\n                  StringBuilder sb = new StringBuilder( errorText );\n                  if ( sb.length() > 0 ) {\n                    sb.append( Const.CR );\n                  }\n                  sb.append( message );\n                  errorText = sb.toString();\n                }\n                if ( errorHandler != null ) {\n                  errorHandler.handleLineError( textFileLine.getLineNumber(), AbstractFileErrorHandler.NO_PARTS );\n                }\n\n                if ( info.isErrorLineSkipped() ) {\n                  r = null; // compensates for stmt: r.setIgnore();\n                }\n              } else {\n                throw new KettleException( message, e );\n              }\n            } else {\n              value = pol;\n            }\n          }\n        } else {\n          // No data found: TRAILING NULLCOLS: add null value...\n          value = null;\n        }\n\n        // Now add value to the row (if we're not skipping the row)\n        if ( r != null ) {\n          r[valuenr] = value;\n        }\n      }\n\n      // none of this applies if we're skipping the row\n      if ( r != null ) {","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java#L716-L752","documentation":"convertLineToRow() throws a KettleException carrying the runtime variable 'message' when a per-field conversion (via a conversion meta / value normalization, e.g. DataConverter) fails on a row AND error handling for that conversion is not set to skip the line. The message describes the field-level conversion failure; the original exception is attached.","triggerScenarios":"A field value in the file cannot be converted to the declared field type/format (e.g. 'abc' into a Number field, bad date format) while isErrorLineSkipped() is false, so the step aborts instead of routing the row to error handling.","commonSituations":"Wrong field type or format mask defined in the Fields tab, decimal separators differing from the locale, empty values mapped to non-nullable numeric/date fields.","solutions":["Read 'message' in the exception — it names the field and conversion that failed; fix that field's type/format in the Fields tab.","Enable error handling on the step and choose to skip error lines so bad rows are routed instead of aborting the transformation.","Correct the source data or add a 'Format' mask matching the actual values (dates, numbers, currency).","Set appropriate null/empty handling (treat empty string as null) for numeric fields."],"exampleFix":"// before: field 'amount' declared Number, data uses comma decimal separator '12,50'\n// after: set the field's Format to match, e.g. grouping ',' decimal '.'\n//   or enable error handling: step.setLineHandlingError -> skip error lines\n//   and declare Format '###,##0.00' appropriately for the locale","handlingStrategy":"validation","validationCode":"// Validate field values against declared types/formats before the step converts them\ntry { new java.text.SimpleDateFormat(\"yyyy-MM-dd\").parse(dateValue); } catch (ParseException ex) { reject(dateValue); }\ntry { new java.text.DecimalFormat(\"#,##0.00\").parse(amountValue); } catch (ParseException ex) { reject(amountValue); }","typeGuard":null,"tryCatchPattern":"try {\n  row = convertLineToRow(line);\n} catch (KettleException e) {\n  if (message == null || !skipOnError) throw e; // abort with field details in message\n  errorRowHandler.handle(line, e);\n}","preventionTips":["Match field types and Format masks to the actual data (dates, decimals, locale)","Enable error handling / 'skip error lines' for dirty real-world data","Treat empty strings as null for numeric fields","Audit a sample of the file with step Preview before running in production"],"tags":["row-processing","type-conversion","text-file-input"],"backgroundTag":"type-mismatch","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}