Skip to content

Replace goog.asserts when validating user data #824

@AnmAtAnm

Description

@AnmAtAnm

goog.asserts functions will only throw when goog.asserts.ENABLE_ASSERTS is true. This is turned off as part of the compilation process, and so no asserts will throw in the blockly_compressed.js package. We want these validations for user data, and should replace goog.assert in those case.

goog.asserts methods should be reserved for checks against things that should never happen (cases the imply other code is wrong). Not expected failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExternal contributions actively solicited

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions