{
    "mode": "perldoc",
    "parameter": "Test::Unit::Assertion::Exception",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Test%3A%3AUnit%3A%3AAssertion%3A%3AException/json",
    "generated": "2026-06-13T22:15:26Z",
    "synopsis": "require Test::Unit::Assertion::Exception;\nmy $assertraised =\nTest::Unit::Assertion::Exception->new('MyException');\n# This should succeed\n$asserteq->doassertion(sub { MyException->throw() });\n# This should fail\n$asserteq->doassertion(sub { });",
    "sections": {
        "NAME": {
            "content": "Test::Unit::Assertion::Exception - A assertion for raised exceptions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "require Test::Unit::Assertion::Exception;\n\nmy $assertraised =\nTest::Unit::Assertion::Exception->new('MyException');\n\n# This should succeed\n$asserteq->doassertion(sub { MyException->throw() });\n\n# This should fail\n$asserteq->doassertion(sub { });\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Although the SYNOPSIS shows how you'd use Test::Unit::Assertion::Exception directly, it is more\nsensibly used indirectly via \"Test::Unit::Test::assertraises()\", which instantiates a\n\"Test::Unit::Assertion::Exception\".\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (c) 2001 Piers Cawley <pdcawley@iterative-software.com>.\n\nAll rights reserved. This program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "*   Test::Unit::TestCase\n\n*   Test::Unit::Assertion\n",
            "subsections": []
        }
    },
    "summary": "Test::Unit::Assertion::Exception - A assertion for raised exceptions",
    "flags": [],
    "examples": [],
    "see_also": []
}