OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [noreturn3.adb] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do compile }
2
 
3
with Ada.Exceptions;
4
 
5
package body Noreturn3 is
6
 
7
  procedure Raise_Error (E : Enum; ErrorMessage : String) is
8
 
9
    function Msg return String is
10
    begin
11
      return "Error :" & ErrorMessage;
12
    end;
13
 
14
  begin
15
    case E is
16
       when One =>
17
         Ada.Exceptions.Raise_Exception (Exc1'Identity, Msg);
18
 
19
       when Two =>
20
         Ada.Exceptions.Raise_Exception (Exc2'Identity, Msg);
21
 
22
       when others =>
23
         Ada.Exceptions.Raise_Exception (Exc3'Identity, Msg);
24
    end case;
25
  end;
26
 
27
end Noreturn3;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.