denoland / denoland/deno_error

Require explicit override for class when transparent error has an existing class

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

It's too easy to accidentally override a transparent error's class: https://github.com/denoland/deno_error/issues/2#issuecomment-2523282960

```
#[derive(Debug, JsError)]
#[class(type)]
pub struct FailedReadingLocalFileError {
...
}

#[derive(Debug, Error, JsError)]
pub enum FetchNoFollowErrorKind {
#[class(generic)] // bad, this should have been `inherit`
#[error(transparent)]
ReadingFile(FailedReadingLocalFileError),
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.