aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sem_names.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/sem_names.adb b/sem_names.adb
index 9f16b365f..65624a709 100644
--- a/sem_names.adb
+++ b/sem_names.adb
@@ -2386,7 +2386,10 @@ package body Sem_Names is
Attr);
return Error_Mark;
when others =>
- raise Internal_Error;
+ Error_Msg_Sem ("Attribute '"
+ & Name_Table.Image(Get_Attribute_Identifier (Attr))
+ & " not valid on this type", Attr);
+ return Error_Mark;
end case;
Location_Copy (Res, Attr);
Prefix := Get_Named_Entity (Get_Prefix (Attr));