Closed Tom-McQuillan closed 2 months ago
I would suggest you just drop the warning in the "Idle" case. There is never an error there.
@drjdpowell Are you suggesting clearing the warnings before the event structure? as per the screenshot? I like this approach as it would be backwards compatible. However, it doesn't allow the developer to handle the warning -> that being said, it's never been a feature before (and AFAIK never something anyone has asked for)
Yes, that's right.
I have never seen code where a warning is actually handled.
How about this as a solution? Parse State Queue could route to the Error Handler
frame if it detects a warning.
@drjdpowell, @Tom-McQuillan, @philippe-guerit, @HunterJKI can you think of any unintended side-effects that would make such a change problematic for existing applications?
One could argue that it's good user might see warnings show up in the Error Handler frame that they previously did not know about.
I like this solution, but would have Post Action states conditional on incoming errors not warnings
On Thu, 4 Jul 2024, 22:41 Jim Kring, @.***> wrote:
How about this as a solution? Parse State Queue could route to the Error Handler frame if it detects a warning.
@drjdpowell https://github.com/drjdpowell, @Tom-McQuillan https://github.com/Tom-McQuillan, @philippe-guerit https://github.com/philippe-guerit can you think of any unintended side-effects that would make such a change problematic for existing applications?
image.png (view on web) https://github.com/JKISoftware/JKI-State-Machine/assets/381432/25d88438-8755-41a6-88a3-711a563e3199
— Reply to this email directly, view it on GitHub https://github.com/JKISoftware/JKI-State-Machine/issues/29#issuecomment-2209584972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY76AOSTAWJVS4D4ZTH6G2LZKW6QVAVCNFSM6AAAAABKH6BQVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGU4DIOJXGI . You are receiving this because you were mentioned.Message ID: @.***>
Resolved in #31
If a warning occurs (for example, if the number of VISA bytes read matches the buffer size a warning is injected), it can never leave the error shift registers.
Proposal: In the template create a new Warning Handler (along side the existing Error Handler) state. The default behavior will be to clear the warning.