-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Add
] Neo Build Error Base - Part 2
#3730
[Add
] Neo Build Error Base - Part 2
#3730
Conversation
….Core/add/exceptions/base
This reverts commit 027dafe.
|
||
namespace Neo.Build.Core.Exceptions | ||
{ | ||
internal interface INeoBuildException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abstract class : Exception
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this CAN BE used the same way as Exception
class. My initial R&D did what your requesting. It didnt turn out very good after a while. Because we no longer using dotnet
known exceptions. Plus that is why I added an interface.
You only use abstract class
if you are defining common processing of data, not defining it.
Interface == define data
abstract == define code redundancy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then better to rename it to INeoBuildError
because it's not an exception @cschuchardt88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an exception. You use throw
to throw the exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't throw an interface, so it's not an exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, The interface is to be used to let us know that the exception is ours. It we throw base
exception and do if (something is exception e)
we wouldn't know if its neo-build
caught exception or code bug. Helps with other stuff too. You will see soon, what I'm talking about. If it ends up not being useful, than it will be removed. I'm just putting this stuff in the repo and doing a couple of files to, so the team can help develop, if they wish and making the review process easier then 100+ files at once. This is why I created neo-build
branch. Nothing is set in stone.
Add
] Neo Build Error BaseAdd
] Neo Build Error Base - Part 2
…//github.com/cschuchardt88/neo into neo-build/Neo.Build.Core/add/exceptions/base
….Core/add/exceptions/base
Blocks
Add
] File Not Found Exception - Part 3 #3734Add
] File Denied Exception - Part 3 #3733Add
] Path Not Found Exception - Part 3 #3746Add
] Invalid File Format exception - Part 3 #3750Change Log
NeoBuildException.cs
file.INeoBuildException.cs
file.Type of change
How Has This Been Tested?
Checklist: