2019-11-24 12:27:50 +01:00
|
|
|
module main
|
|
|
|
|
|
|
|
import (
|
|
|
|
some_module
|
|
|
|
)
|
|
|
|
|
|
|
|
fn main(){
|
|
|
|
mut sub := some_module.get_subscriber()
|
|
|
|
sub.subscribe("error", on_error)
|
|
|
|
some_module.do_work()
|
|
|
|
}
|
|
|
|
|
2020-01-22 17:41:08 +01:00
|
|
|
fn on_error(sender voidptr, e &some_module.Error) {
|
|
|
|
println(e.message)
|
2019-12-01 08:33:26 +01:00
|
|
|
}
|