class_docstr: This class allows you to pass custom error messages to the user. You can do so by raising a gr.Error("custom message") anywhere in the code, and when that line is executed the custom message will appear in a modal on the demo.
  Example:
      import gradio as gr
      def divide(numerator, denominator):
          if denominator == 0:
              raise gr.Error("Cannot divide by zero!")
      gr.Interface(divide, ["number", "number"], "number").launch()
  Demos: calculator, blocks_chained_events
class_docstr_tok: ["This","class","allows","you","to","pass","custom","error","messages","to","the","user",".","You","can","do","so","by","raising","a","gr.Error","(","``","custom","message","''",")","anywhere","in","the","code",",","and","when","that","line","is","executed","the","custom","message","will","appear","in","a","modal","on","the","demo",".","Example",":","import","gradio","as","gr","def","divide","(","numerator",",","denominator",")",":","if","denominator","==","0",":","raise","gr.Error","(","``","Can","not","divide","by","zero","!","''",")","gr.Interface","(","divide",",","[","``","number","''",",","``","number","''","]",",","``","number","''",")",".launch","(",")","Demos",":","calculator",",","blocks_chained_events"]
docstr: Parameters:
      message: The error message to be displayed to the user.
docstr_tok: ["Parameters",":","message",":","The","error","message","to","be","displayed","to","the","user","."]
code: def __init__(self, message: str = "Error raised."):
      """
      Parameters:
          message: The error message to be displayed to the user.
      """
      self.message = message
      super().__init__(self.message)
  
imports: from gradio_client.documentation import document, set_documentation_group
label_desc: Use image node_id 1 to create a new Error object from inherited base classes: Exception with example: obj = Error(message)