Comments (11)
Thank you for your comment.
I introduced error handling wrapper functions also for fputs(), fprintf(), etc.
Please check out the branch 'develop'.
from packcc.
Thanks for your source code improvement.
🔮
- Can a function like “perror” be helpful for your error reporting?
- Can it make sense to move the deletion of files into an atexit() callback function?
- Are you interested to apply aspect-oriented software development?
- Would you like to encapsulate error detection and corresponding exception handling as a reusable aspect in this software?
from packcc.
- Can a function like “perror” be helpful for your error reporting?
Partially yes, because it can print an errno message, but partially no, because it does not provide a formatting functionality like printf().
It needs some efforts to implement an error reporting function with an errno message printing feature, with a formatting functionality, and with portability.
Currently, I don't think errno message is so important for practical use.
So, I want to skip the efforts.
- Can it make sense to move the deletion of files into an atexit() callback function?
I don't think atexit() is suitable for this case because file deletion is not required in normal situations.
I think it should be explicitly cared whenever context destruction.
Moreover, I dislike callbacks without custom arguments because it needs information passing via global variables.
- Are you interested to apply aspect-oriented software development?
- Would you like to encapsulate error detection and corresponding exception handling as a reusable aspect in this software?
In the context of packcc, sorry, I'm not interested.
I want to keep packcc compilable using a standard C compiler.
from packcc.
I think it should be explicitly cared whenever context destruction.
Would you like to improve exception handling another bit also for your software?
from packcc.
Yes in general, but no as for packcc.
I want to keep packcc as plain as possible.
I think complete exception handling mechanism in C brings unwanted complexity like longjump().
Such a mechanism is too much, considering that exceptional situations in packcc are very simple.
from packcc.
Does the mentioning of exception handling “distract” too much from further software development possibilities to complete the error handling finally?
from packcc.
I think error handling is quite important to software for practical use.
So, developers should make efforts to care exceptional cases.
However, in my opinion, the specifications of error handling may be as minimal as required to actual exceptional situations.
Since I want to keep PackCC as simple as possible, I don't adopt luxurious error handling which brings implementation complexity.
from packcc.
Anyway, can I close this issue?
I committed the requested feature to the branch master
.
from packcc.
- How do you think about to improve static source code analysis also for this software?
- Can it become nicer to specify the error handling wrappers as aspects?
from packcc.
As I mentioned before, I'm not interested in aspect-oriented framework.
It might be an endless discussion, which seems not to be suitable on this issue board.
I want to quit answering to your questionnaire, OK?
from packcc.
As of the version 1.2.2, error handling features were added to all input and output functions.
I close this issue.
from packcc.
Related Issues (20)
- `$n` should be independent across alternatives HOT 4
- C predicates HOT 2
- Peg only mode? HOT 9
- Parser very slow with repeated parse calls HOT 3
- Lexical state support HOT 5
- Import support HOT 10
- Questions not answered in the README HOT 12
- Passing auxil to PCC_DEBUG HOT 3
- AST Mode HOT 11
- Uninitialized variables HOT 8
- value passthrough HOT 4
- parser reads more data than necessary HOT 3
- Strange bad generated parser HOT 5
- Memory usage compared to gcc compiler HOT 13
- raising error from action? HOT 2
- %value and memory management HOT 2
- Consider add support for UCD(Unicode Character Database) rule pattern HOT 3
- Pre type checking possible? HOT 5
- Lookahead woes and more HOT 2
- Parsing a "switch { case n: m }"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packcc.