# Exception behavior with errno

**URL:** <https://forum.ada-lang.io/t/exception-behavior-with-errno/4658>\
**Category:** General\
**Tags:** ada, gnat\
**Created:** [August 23, 2026, 11:58am UTC](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658 "2026-08-23T11:58:07Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [August 25, 2026, 12:45pm UTC](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658/21 "2026-08-25T12:45:27Z")

</div>

> [@sbenitezb](#):
>
> I saw on your Simple-Components that you had it, but I wanted code generation. I don’t remember if your implementation generates code or only de/serialize from Ada types.

The idea is that no code is needed, except for declarations of Ada types. You describe an ASN.1 packet as single Ada record type. There is a direct mapping from ASN.1 syntax to Ada. E.g.

```ada
SEQUENCE
{ A [0] INTEGER,
   B [1] IMPLICIT INTEGER,
   C [2] IMPLICIT INTEGER,
   D [3] IMPLICIT INTEGER
}

```

becomes

```ada
type Four_Integers is new Tagged_Sequence_Data_Item with record
   A : Integer_Data_Item;
   B : Implicit_Integer_Data_Item;
   C : Implicit_Integer_Data_Item;
   D : Implicit_Integer_Data_Item;
end record;

```

So there is little need to generate that. The record type can be directly used in I/O communication, e.g. you tell the communication layer that this record is to the packet. Then when you get a callback on data received the record is already filled with decoded data. That is.

---

<div class="post-metadata">

**Author:** ![JC001](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@JC001](https://forum.ada-lang.io/u/JC001)\
**Post date:** [August 26, 2026, 8:53am UTC](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658/22 "2026-08-26T08:53:14Z")

</div>

> [@sbenitezb](#):
>
> That only works locally, which is fine for my current purposes, but it would prevent me from connecting a GUI to a remote machine if I ever wanted to do that.

You might want to consider Gnoga for your GUI. It is all Ada, works on any platform with a browser, can be used locally, and easily allows remote use as well.

---

<div class="post-metadata">

**Author:** ![sbenitezb](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/sbenitezb/32/285_2.png) [@sbenitezb](https://forum.ada-lang.io/u/sbenitezb)\
**Post date:** [October 24, 2026, 12:27pm UTC](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658/23 "2026-10-24T12:27:10Z")

</div>

I started a new project with Gnoga. I had started it in CL (with Clog) but decided to convert it to Gnoga instead. I’m very satisfied with it.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [October 24, 2026, 8:42pm UTC](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658/24 "2026-10-24T20:42:42Z")

</div>

IIRC there is a Common LISP version of Gnoga; check with DBotton on freenode’s #ada or #LISP IRC channels. (I think it’s freenode.)

[Previous page](https://forum.ada-lang.io/t/exception-behavior-with-errno/4658.md?page=1)
