{"record":{"id":"9842e4b5a25ea6f4","repo":"pentaho/pentaho-kettle","slug":"regexeval-log-errorinstep","errorCode":null,"errorMessage":"RegexEval.Log.ErrorInStep","messagePattern":"RegexEval\\.Log\\.ErrorInStep","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/regexeval/RegexEval.java","lineNumber":214,"sourceCode":"      }\n\n      if ( log.isRowLevel() ) {\n        logRowlevel( BaseMessages.getString( PKG, \"RegexEval.Log.ReadRow\" )\n          + \" \" + getInputRowMeta().getString( row ) );\n      }\n\n      // copy row to output rowset(s);\n      //\n      putRow( data.outputRowMeta, outputRow );\n    } catch ( KettleException e ) {\n      boolean sendToErrorRow = false;\n      String errorMessage = null;\n\n      if ( getStepMeta().isDoingErrorHandling() ) {\n        sendToErrorRow = true;\n        errorMessage = e.toString();\n      } else {\n        throw new KettleStepException( BaseMessages.getString( PKG, \"RegexEval.Log.ErrorInStep\" ), e );\n      }\n\n      if ( sendToErrorRow ) {\n        // Simply add this row to the error row\n        putError( getInputRowMeta(), outputRow, 1, errorMessage, null, \"REGEX001\" );\n      }\n    }\n    return true;\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (RegexEvalMeta) smi;\n    data = (RegexEvalData) sdi;\n\n    if ( super.init( smi, sdi ) ) {\n      // Embedded options\n      String options = meta.getRegexOptions();\n","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/regexeval/RegexEval.java#L196-L232","documentation":"RegexEval.processRow caught an exception while applying the regular expression to a row. When the step metadata does NOT enable error handling, it wraps the cause in a KettleStepException with message 'RegexEval.Log.ErrorInStep' and aborts the transformation. With error handling enabled the row is instead routed to the error row stream.","triggerScenarios":"A malformed or non-matching regex evaluation throws during processRow (e.g. PatternSyntaxException from an invalid script regex, or NullPointerException on fields) while step error handling is disabled.","commonSituations":"Typing an invalid regex in the RegexEval step dialog; input field unexpectedly null; running transformations copied from examples where 'Error handling' was never configured.","solutions":["Validate the regex in the step dialog before running (it compiles on preview).","Enable error handling on the step so bad rows go to an error stream instead of failing the transformation.","Check upstream steps ensure the evaluated field is a non-null String.","Fix the regex pattern that threw the underlying exception (see the chained cause)."],"exampleFix":"// before: step fails on bad rows\n// no error handling configured\n// after: configure error handling so failures are routed, not thrown\nstepMeta.setSupportsErrorHandling( true ); // or set via the 'Error handling' dialog\n","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["regex","transformation","kettle-step-exception"],"backgroundTag":"invalid-regex-pattern","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"}