class SQLite3::Database::FunctionProxy

def set_error(error)

The function will then return that error.
Set the result of the function to the given error message.
def set_error(error)
  @driver.result_error(@func, error.to_s, -1)
end