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

Design code inheritance. #133

Closed
bigeasy opened this issue Nov 27, 2020 · 1 comment
Closed

Design code inheritance. #133

bigeasy opened this issue Nov 27, 2020 · 1 comment
Assignees

Comments

@bigeasy
Copy link
Owner

bigeasy commented Nov 27, 2020

Need to determine how codes are inherited in derived exceptions.

@bigeasy bigeasy added this to the Convert to ES6. milestone Nov 27, 2020
@bigeasy bigeasy self-assigned this Nov 27, 2020
@bigeasy bigeasy added this to Backlog in Convert to ES6. via automation Nov 27, 2020
bigeasy pushed a commit that referenced this issue Nov 27, 2020
Pretty much how it is going to work. Symbol is inherited by properties
such as message format can change.

See #133.
@bigeasy bigeasy closed this as completed in e6ce05b Dec 2, 2020
Convert to ES6. automation moved this from Backlog to Done Dec 2, 2020
@bigeasy bigeasy reopened this Dec 2, 2020
Convert to ES6. automation moved this from Done to In progress Dec 2, 2020
@bigeasy
Copy link
Owner Author

bigeasy commented Dec 2, 2020

Reopening because we have to inherit both codes and aliases now.

bigeasy pushed a commit that referenced this issue Dec 2, 2020
Thinking aloud about inheritance. Do not want to have descendent classes
inherit templates by default. Don't really want it to happen at all, but
certainly not by default. Looking to create a symbol based system, which
is probably something of an abuse, certainly is uninviting, but the
alternative is to do nothing and suggest the user defined reusable codes
as a code function they share between exceptions.

At least there's a mechanism. Who creates error hierarchies in
JavaScript anyway?

See #140.
See #133.
bigeasy pushed a commit that referenced this issue Dec 3, 2020
Working through code definition and started with updating `create`'s
`vargs` processing so that an array can include anything that is an
argument and gets unshifted onto the `vargs` so that definitions are
recursive. This means code functions can return arrays.

Also, there's an ambiguity between an initial code function and the
super class. They are both functions.

See #140.
See #133.
bigeasy pushed a commit that referenced this issue Dec 3, 2020
Merge `Codes` and `Prototype` into one object.

See #140.
See #133.
bigeasy pushed a commit that referenced this issue Dec 3, 2020
If you specify the symbol of a super class code the code will be
inherited with the name, message and properties of the code in the super
class.

See #141.
See #133.
bigeasy pushed a commit that referenced this issue Dec 4, 2020
bigeasy pushed a commit that referenced this issue Dec 4, 2020
`codes` is a public interface. It no longer reports the templates
internal to the generated exception.

See #140.
See #133.
bigeasy pushed a commit that referenced this issue Dec 5, 2020
All in one place so I can work on it with the documentation.

See #133.
bigeasy pushed a commit that referenced this issue Dec 6, 2020
Not sure why this didn't occur to me earlier. I was using `symbol` as a
way to specify a template base, but that shouldn't have blocked the
recognition of this modification.

See #133.
bigeasy pushed a commit that referenced this issue Dec 8, 2020
@bigeasy bigeasy closed this as completed in f9f0a2c Dec 9, 2020
Convert to ES6. automation moved this from In progress to Done Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant