Skip to content

Better errors for function parameters #328

@rwest202

Description

@rwest202

What is wrong?

Utility functions should notify you when you make some basic mistakes, like forgetting to pass in a required parameter.

Where does it happen?

likely is one of the functions. It may be happening in more.

How do we replicate the issue?

brain.likely(input)
This will give you an error like so,

var output = net.run(input);
                 ^
TypeError: Cannot read property 'run' of undefined

However, it should give you an error like, `Required parameter 'net' is undefined'

How important is this (1-5)?

  1. All considered it's not too difficult to look at the stack trace. But it's important for usability in a library.

Expected behavior (i.e. solution)

Errors that look like this, `Required parameter 'net' is undefined'

Other Comments

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions