{
    "content": [
        {
            "type": "text",
            "text": "# Specio::Exception (perldoc)\n\n## NAME\n\nSpecio::Exception - An exception class for type constraint failures\n\n## SYNOPSIS\n\nuse Try::Tiny;\ntry {\n$type->validateordie($value);\n}\ncatch {\nif ( $->isa('Specio::Exception') ) {\nprint $->message, \"\\n\";\nprint $->type->name, \"\\n\";\nprint $->value, \"\\n\";\n}\n};\n\n## DESCRIPTION\n\nThis exception class is thrown by Specio when a type check fails. It emulates the\nThrowable::Error API, but doesn't use that module to avoid adding a dependency on Moo.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **API**\n- **OVERLOADING**\n- **SUPPORT**\n- **SOURCE**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Specio::Exception",
        "section": "",
        "mode": "perldoc",
        "summary": "Specio::Exception - An exception class for type constraint failures",
        "synopsis": "use Try::Tiny;\ntry {\n$type->validateordie($value);\n}\ncatch {\nif ( $->isa('Specio::Exception') ) {\nprint $->message, \"\\n\";\nprint $->type->name, \"\\n\";\nprint $->value, \"\\n\";\n}\n};",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "API",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "OVERLOADING",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SOURCE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Specio::Exception - An exception class for type constraint failures\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 0.47\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Try::Tiny;\n\ntry {\n$type->validateordie($value);\n}\ncatch {\nif ( $->isa('Specio::Exception') ) {\nprint $->message, \"\\n\";\nprint $->type->name, \"\\n\";\nprint $->value, \"\\n\";\n}\n};\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This exception class is thrown by Specio when a type check fails. It emulates the\nThrowable::Error API, but doesn't use that module to avoid adding a dependency on Moo.\n",
                "subsections": []
            },
            "API": {
                "content": "This class provides the following methods:\n\n$exception->message\nThe error message associated with the exception.\n\n$exception->stacktrace\nA Devel::StackTrace object for the exception.\n\n$exception->type\nThe type constraint object against which the value failed.\n\n$exception->value\nThe value that failed the type check.\n\n$exception->asstring\nThe exception as a string. This includes the method and the stack trace.\n",
                "subsections": []
            },
            "OVERLOADING": {
                "content": "This class overloads stringification to call the \"asstring\" method.\n",
                "subsections": []
            },
            "SUPPORT": {
                "content": "Bugs may be submitted at <https://github.com/houseabsolute/Specio/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
                "subsections": []
            },
            "SOURCE": {
                "content": "The source code repository for Specio can be found at <https://github.com/houseabsolute/Specio>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Dave Rolsky <autarch@urth.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is Copyright (c) 2012 - 2021 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
                "subsections": []
            }
        }
    }
}