Class ParseOrSemanticError

  • Direct Known Subclasses:
    ParseOrSemanticError.ParseError, ParseOrSemanticError.SemanticError

    public class ParseOrSemanticError
    extends Object
    Indicates that something went wrong while parsing or validating the invoice. Parsing errors should be mostly seen as opaque and are only there for debugging reasons. Semantic errors like wrong signatures, missing fields etc. could mean that someone tampered with the invoice.
    • Method Detail

      • parse_error

        public static ParseOrSemanticError parse_error​(ParseError a)
        Utility method to constructs a new ParseError-variant ParseOrSemanticError
      • semantic_error

        public static ParseOrSemanticError semantic_error​(SemanticError a)
        Utility method to constructs a new SemanticError-variant ParseOrSemanticError
      • eq

        public boolean eq​(ParseOrSemanticError b)
        Checks if two ParseOrSemanticErrors contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
      • to_str

        public String to_str()
        Get the string representation of a ParseOrSemanticError object