Oninit® 4gl2everywhere — Error Format
Errors back to the 4GL client travel as SQ_ERR tokens. The wire payload is i16 sqlcode + i16 isam_code + u16 message-length + message bytes (even-padded), followed by SQ_EOT. Message bodies follow a canonical format so 4GL programs and operators can match on a stable string.
Wire format
Message bodies have the shape IFXBRIDGE:<CATEGORY>:<DETAIL>. The leading IFXBRIDGE: distinguishes bridge-emitted errors from passthrough errors a real Informix server would generate; the category is one of a fixed set; the detail is human-readable text (no embedded colons besides the two structural ones).
Categories
| Category | Meaning | Example |
|---|---|---|
| PROTOCOL | Malformed or unsupported wire-protocol token. | IFXBRIDGE:PROTOCOL:not_implemented:SQ_PUT |
| SQL | Backend SQL error surfaced through the backend's error-mapping facility. | IFXBRIDGE:SQL:dbopen_failed:sysmaster |
| INTERNAL | Bridge-internal failure (allocation, encode, unexpected state). | IFXBRIDGE:INTERNAL:malloc_failed |
| CONNECTION_LIMIT | Listener's max_sessions cap reached. | IFXBRIDGE:CONNECTION_LIMIT:Maximum sessions reached |
| SHUTDOWN | Listener is draining; new connections rejected. | IFXBRIDGE:SHUTDOWN:Listener draining |
| BACKEND_DOWN | Configured backend is unavailable at session start. | IFXBRIDGE:BACKEND_DOWN:Backend unavailable |
Reserved SQLCODEs
-746 is reserved for connection rejection (cap, drain, backend-down). -908 is the generic protocol / bridge internal error. Backend-mapped errors carry the SQLCODE the backend returned via the backend's error-mapping facility (or -1 when the backend can't be more specific).