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

Use a Response object instead of Exceptions #29

Closed
lokka30 opened this issue Oct 11, 2021 · 2 comments
Closed

Use a Response object instead of Exceptions #29

lokka30 opened this issue Oct 11, 2021 · 2 comments
Assignees
Labels
priority: high High priority status: confirmed Approved / validated thoughts wanted Thoughts from other developers would be appreciated on this issue. type: improvement A feature is added or adjusted
Projects

Comments

@lokka30
Copy link
Member

lokka30 commented Oct 11, 2021

See discussion here.

@lokka30 lokka30 added type: improvement A feature is added or adjusted priority: high High priority thoughts wanted Thoughts from other developers would be appreciated on this issue. status: confirmed Approved / validated labels Oct 11, 2021
@lokka30 lokka30 self-assigned this Oct 11, 2021
@lokka30 lokka30 added this to To do in v1.0 via automation Oct 11, 2021
lokka30 added a commit that referenced this issue Oct 13, 2021
Changes:
* Created multiple 'Economy Responses' (#29)
* Removed all Exceptions due to the above change.
@lokka30
Copy link
Member Author

lokka30 commented Oct 13, 2021

I've made my first attempt at getting this resolved.

Here, I have replaced all exceptions with Responses. This is the response package where you can view all of the Responses I've added.

I have not added Responses to all methods, only those which could fail (has...Account, get...Account, and create...Account - for both PlayerAccounts and BankAccounts of course). I can add more Responses wherever necessary.

I am not pleased with the new Responses system. It seems quite messy to use. I'm sure there are ways to improve it, but I just can't think of them. At least it doesn't force you to use 'failure' for 'false' - 😉😉 Vault.

Please let me know what you all think - below is preferred but in the Spigot thread is fine as well.

@lokka30
Copy link
Member Author

lokka30 commented Oct 15, 2021

Done.

@lokka30 lokka30 closed this as completed Oct 15, 2021
v1.0 automation moved this from To do to Done Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high High priority status: confirmed Approved / validated thoughts wanted Thoughts from other developers would be appreciated on this issue. type: improvement A feature is added or adjusted
Projects
No open projects
v1.0
  
Done
Development

No branches or pull requests

1 participant