    

 ## On this page

  

 

 # setError

 Last update: 30.07.2026 

public [setError](set-error.md)(run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), errorID: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), message: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

sets an error for the given run, ID and message

#### Parameters

runthe run of the DataHistory to set the error for (0-based index)errorIDthe ID of the error to setmessagethe message given for the error#### Throws

[ModelCenterException](./../-model-center-exception/index.md)