pyspark.sql.functions.raise_error

pyspark.sql.functions.raise_error(errMsg: Union[pyspark.sql.column.Column, str]) → pyspark.sql.column.Column[source]

Throws an exception with the provided error message.

Parameters
errMsgColumn or str

A Python string literal or column containing the error message

.. versionadded:: 3.1