IndentationError
classin packageklyn
public class IndentationError extends SyntaxError
└ IndentationError

Exception thrown when source code has an invalid indentation level or is missing an indented block. This is a specialized SyntaxError: a handler for SyntaxError also catches IndentationError.

try:
    Application.compile("if true:\npass\n")
catch error as IndentationError:
    print(error.message)
Inherited Properties
propertyInherited Properties from Exception: message
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public IndentationError
IndentationError(message as String = "Indentation error")
Creates an indentation diagnostic.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml