chore: log error when saving state fails
This commit is contained in:
parent
9e3dfd2428
commit
289fc2b69a
@ -59,7 +59,6 @@ type fsData struct {
|
|||||||
func (fsd *fsData) SetLanguageSelected(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
func (fsd *fsData) SetLanguageSelected(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
inputStr := string(input)
|
inputStr := string(input)
|
||||||
res := resource.Result{}
|
res := resource.Result{}
|
||||||
|
|
||||||
switch inputStr {
|
switch inputStr {
|
||||||
case "0":
|
case "0":
|
||||||
res.FlagSet = []uint32{state.FLAG_LANG}
|
res.FlagSet = []uint32{state.FLAG_LANG}
|
||||||
@ -257,6 +256,9 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
pr = pr.WithContent(&st, ca)
|
pr = pr.WithContent(&st, ca)
|
||||||
err = pr.Save(cfg.SessionId)
|
err = pr.Save(cfg.SessionId)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Failed to save state with error: %v\n", err)
|
||||||
|
}
|
||||||
en, err = engine.NewPersistedEngine(ctx, cfg, pr, rfs)
|
en, err = engine.NewPersistedEngine(ctx, cfg, pr, rfs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "engine create exited with error: %v\n", err)
|
fmt.Fprintf(os.Stderr, "engine create exited with error: %v\n", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user