Skip to content

Uncaught Error when incorrect problem name selected  #12

@anchat1990

Description

@anchat1990

When trying out stream-adventure I found that a typo in the problem name when "select"ing problem leads to the following uncaught error

> 
> var p = adv.fn();
>                ^
> 
> TypeError: Cannot read property 'fn' of undefined
>     at Shop.select (/home/achatterjee/sandbox/stream-adventure/node_modules/adventure/index.js:248:16)
>     at Shop.execute (/home/achatterjee/sandbox/stream-adventure/node_modules/adventure/index.js:97:14)
>     at Object.<anonymous> (/home/achatterjee/sandbox/stream-adventure/bin/cmd.js:18:6)
>     at Module._compile (module.js:409:26)
>     at Object.Module._extensions..js (module.js:416:10)
>     at Module.load (module.js:343:32)
>     at Function.Module._load (module.js:300:12)
>     at Function.Module.runMain (module.js:441:10)
>     at startup (node.js:139:18)
>     at node.js:968:3
> 

I'm about to put in a pull request for this error to be caught and an informative error message to be displayed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions