XAMPPRocky / fluent-templates

Easily add Fluent to your Rust project.
Apache License 2.0
136 stars 28 forks source link

Return Result instead of panic when looking up? #49

Closed hongquan closed 1 year ago

hongquan commented 1 year ago

Currently, the lookup_xxx functions, when encoutering bad FTL message (wrong syntax, for example), it just panic. Could you please make the function return Result, instead of panic?

XAMPPRocky commented 1 year ago

Thank you for your issue! This has been resolved by #47 which adds try_ variants which return Options instead of panicking

hongquan commented 10 months ago

@XAMPPRocky In #47, StaticLoader.try_xxx still calls lookup_single_language and this one still panic!

XAMPPRocky commented 10 months ago

Well that shouldn't be 😄