pyspark.sql.functions.
raise_error
Throws an exception with the provided error message.
New in version 3.1.