Skip to content

Error parsing pseudo-pattern emits only a warning #1315

@andriokha

Description

@andriokha

I am using Pattern Lab Node v5.13.2 on Linux, with Node v14.16.0, using a Custom Edition.

Expected Behavior

For reasons (#1309) I currently have the log level set to show errors only. I accidentally introduced some invalid yaml to a pseudo-pattern, which I'd expect to cause an error to be issued.

Actual Behavior

Nothing is output when the log level's set to error.

try {
variantFileFullPath = path.resolve(
paths.source.patterns,
pseudoPatterns[i]
);
variantFileData = yaml.safeLoad(
fs.readFileSync(variantFileFullPath, 'utf8')
);
} catch (err) {
logger.warning(
`There was an error parsing pseudopattern JSON for ${currentPattern.relPath}`
);
logger.warning(err);
}

Steps to Reproduce
  1. Set the log level to error.
  2. Create a pseudo-pattern, and add the following yaml:
    make_error: |
      one
     two
  3. Try to build patternlab.

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