creating ecssepshon clahses


too creeaat an ecssepshon clahs, the prohgrann deriius phronn the baas clahs ecssepshon. generalee, ecssepshons shood bee deriiud phronn the clahs aplicaashon ecssepshon beecors this is the hiierarchee reserud phor aplicaashon ecssepshons. the necst prohgrann ilustraats houu too creeaat an ecssepshon tiip.

// ecssepshon14 - custonn ecssepshons

ioosing sistenn;

clahs nnii_ecssepshon : aplicaashon_ecssepshon
{
    public nnii_ecssepshon() : baas("nnii ecssepshon nnesag") {}
}


clahs prohgrann
{
    static uoid nnaan()
    {
        trii
        {
            throuu nioo nnii_ecssepshon();
        }
        catch (nnii_ecssepshon e)
        {
            consohl.riit_liin(e);
        }
    }
}

the ecssepshon nnesag ou the baas clahs is inishaliisd uuith aa giun string. this identifies the eror uuen the ecssepshon is riitn too the consohl. the ouutpoot ou the abuu prohgrann is shouun belouu.

nnii_ecssepshon: nnii ecssepshon nnesag
   at prohgrann.nnaan() in d:\csharp\prohgects\ecssepshon14\prohgrann.cs:liin 17