Skip to content

Add ThrowTest module: Throwables escaping module entry points - #20

Open
bumaas wants to merge 1 commit into
symcon:masterfrom
bumaas:throwtest
Open

Add ThrowTest module: Throwables escaping module entry points#20
bumaas wants to merge 1 commit into
symcon:masterfrom
bumaas:throwtest

Conversation

@bumaas

Copy link
Copy Markdown

Test-Case zu https://community.symcon.de/t/144258/51 (auf Wunsch von paresy in #53).

Das Modul ThrowTest lässt gezielt ein Throwable aus jedem Modul-Einstiegspunkt entweichen — jede Wurfstelle mit eindeutigem Meldungstext, damit sofort sichtbar ist, ob der Text im Log ankommt:

WurfstelleAuslöser
MessageSink bei KR_READYCheckbox ThrowOnKernelReady + Neustart — wirft den Original-Praxisfall nach (Engine-TypeError durch get_defined_constants(true)['IP-Symcon'] = null)
ApplyChangesCheckbox ThrowOnApplyChanges + Übernehmen
RequestActionFormular-Button
Öffentliche ModulfunktionFormular-Button (THT_ThrowFromPublicFunction)
Timer-CallbackFormular-Button (1-s-Einmal-Timer)

Beobachtetes Verhalten (SymBox, 9.1-755-feature-rust):

  • Kernel-Kontext (KR_READY, Timer): Die strukturierte ERROR-Zeile hat eine leere Meldungsspalte; der komplette „Fatal error"-Text samt Stacktrace steht zwar im Logfile, aber nur als ungetaggte Rohzeilen direkt darunter (ohne Zeitstempel/Level) — in der Meldungsansicht der Konsole und für jedes Log-Werkzeug unsichtbar:

    08/16/26 22:43:57 | 12407 | ERROR | PHPModule |
    Fatal error: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in .../ThrowTest/module.php:42
    #0 .../ThrowTest/module.php(42): array_search(10100, NULL, true)
    
  • Skript-Kontext (RequestAction, öffentliche Funktion, ApplyChanges per Skript): Der Text erreicht den Aufrufer als Warning; ein fangbares Throwable kommt beim Aufrufer nicht an.

  • Unter C++ 906 zeigte der KR_READY-Fall ebenfalls keinen Text in der strukturierten Zeile (KernelMT | InstanzManager: Fehler bei Instanz #…, Meldung IPS_KERNELMESSAGE:).

Wunsch: Klasse, Meldung und Datei:Zeile in die strukturierte ERROR-Zeile selbst übernehmen.

🤖 Generated with Claude Code

https://claude.ai/code/session_0116EF9RYnMCTwRuYP4PHidQ

Test case for https://community.symcon.de/t/144258/51 - when a Throwable
escapes MessageSink, ApplyChanges, RequestAction, a public module function
or a timer callback, the kernel log should show class, message and
file:line. Each throw site uses a unique message text so it is immediately
visible whether the text makes it into the log.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0116EF9RYnMCTwRuYP4PHidQ
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@bumaas