{
    "mode": "perldoc",
    "parameter": "Specio::Exception",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Specio%3A%3AException/json",
    "generated": "2026-06-13T13:42:21Z",
    "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};",
    "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": []
        }
    },
    "summary": "Specio::Exception - An exception class for type constraint failures",
    "flags": [],
    "examples": [],
    "see_also": []
}