| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| } | ||
|
|
||
| this.message = format(message, ...args) | ||
| this.message = format(message, ...args).trim() |
There was a problem hiding this comment.
Not sure which one will be better, most of the time the if clause will be executed.
| this.message = format(message, ...args).trim() | |
| if (message) args.unshift(message) | |
| this.message = format(...args) |
Sorry, something went wrong.
There was a problem hiding this comment.
I would:
Sorry, something went wrong.
There was a problem hiding this comment.
@climba03003 I implemented your solution; thank you.
@jsumners I tried your solution, but unfortunately it didn't pass tests.
Sorry, something went wrong.
|
I dislike the solution. |
Sorry, something went wrong.
|
@Uzlopak I appreciate the useful feedback. Closing and implementing my own solution that addresses our particular use case. Thank you for your assistance. |
Sorry, something went wrong.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
and the Code of conduct
This PR proposes supporting empty strings as messages to support the following use case:
This supports the use case where the user doesn't desire any prefix or suffix to the message; they want the message to match the argument passed to the error.
The trim() I admit is a little problematic, but without it, the above example looks like: