Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(log): align additional error messages #5801

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

irbull
Copy link
Contributor

@irbull irbull commented Aug 24, 2024

Aligns the error messages in the log folder to match the style guide.

#5574

Aligns the error messages in the `log` folder to match the style guide.

denoland#5574
@irbull irbull requested a review from kt3k as a code owner August 24, 2024 02:04
@github-actions github-actions bot added the log label Aug 24, 2024
Copy link

codecov bot commented Aug 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.22%. Comparing base (95d7b43) to head (33d966d).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5801   +/-   ##
=======================================
  Coverage   96.22%   96.22%           
=======================================
  Files         481      481           
  Lines       38766    38767    +1     
  Branches     5616     5616           
=======================================
+ Hits        37303    37304    +1     
  Misses       1422     1422           
  Partials       41       41           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +70 to +76
throw new Error(`"maxBytes" must be >= 1: received ${this.#maxBytes}`);
}
if (this.#maxBackupCount < 1) {
this.destroy();
throw new Error("maxBackupCount cannot be less than 1");
throw new Error(
`"maxBackupCount" must be >= 1: received ${this.#maxBackupCount}`,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better if these checks were moved to the constructor and we could fast fail then? Or is there a reason someone would construct the object and not want to call setup, and thus want this invalid state?

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit c817a5a into denoland:main Aug 24, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants