diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 13:38:11 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 13:38:11 +1300 |
commit | 82ec0d8c8d1ba164aa2d29c8f1203730aa51988c (patch) | |
tree | 5a97b24d2c1325a2563a4cff70f285fd6da34b44 /body/fltk-widgets-valuators-dials.adb | |
parent | dee76d5884c6f079ea3a2387d07289534a51a0c1 (diff) |
Raises of Internal_FLTK_Error now come with error messages
Diffstat (limited to 'body/fltk-widgets-valuators-dials.adb')
-rw-r--r-- | body/fltk-widgets-valuators-dials.adb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/body/fltk-widgets-valuators-dials.adb b/body/fltk-widgets-valuators-dials.adb index 6dc9e69..93a636a 100644 --- a/body/fltk-widgets-valuators-dials.adb +++ b/body/fltk-widgets-valuators-dials.adb @@ -270,17 +270,21 @@ package body FLTK.Widgets.Valuators.Dials is (This : in out Dial; Event : in Event_Kind; X, Y, W, H : in Integer) - return Event_Outcome is - begin - return Event_Outcome'Val (fl_dial_handle2 + return Event_Outcome + is + Result : Interfaces.C.int := fl_dial_handle2 (This.Void_Ptr, Event_Kind'Pos (Event), Interfaces.C.int (X), Interfaces.C.int (Y), Interfaces.C.int (W), - Interfaces.C.int (H))); + Interfaces.C.int (H)); + begin + return Event_Outcome'Val (Result); exception - when Constraint_Error => raise Internal_FLTK_Error; + when Constraint_Error => raise Internal_FLTK_Error with + "Fl_Dial::handle returned unexpected int value of " & + Interfaces.C.int'Image (Result); end Handle; |