Skip to content

@event does not propagate errors #286

Description

@PGimenez

When an error happens within an @event block, it is not printed and the block fails silently.

MWE:

using GenieFramework
@genietools

@app begin
    @in error = false
    @onbutton error begin
        println("Error ")
        a = nonexistantvar
        println("This will never be printed")
    end
    @event :error_event begin
        println("Error event")
        a = nonexistantvar
        println("This will never be printed")
    end
end

ui() = btn("Error 1", @click(:error)) * btn("Error 2", @on(:click, :error_event))

@page("/", ui)
up()

This is what is printed to the REPL:

Error
┌ Warning: 2024-08-06 10:42:01 UndefVarError(:nonexistantvar)
└ @ Stipple ~/.julia/packages/Stipple/Hr6Qa/src/Stipple.jl:999
Error event

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions