Comments (7)
Hello @Patamap I would like to work on this issue, so can you please elaborate what I need to do to fix this issue?
from flint.
@Patamap can you please explain me a little bit about the issue
from flint.
@mfellows - could you please add a brief description to help @AlkaDas991? I know exception handling was one of your bugbears.
from flint.
Hi Alka, thanks for your interest in this issue -
One example would be spatialtiledlocaldomaincontroller.cpp lines 794-840, you can see the huge variety of exceptions in there - which in theory should be helpful to narrow errors down, but in reality you need a try/catch block a mile long to extract all the information out of the different exception types.
This is particularly a problem in user (module) code where instead of catching all the different exception types in flintexceptions.h, we (well, I...) lazily catch FLINTException, and then all those boost::error_info details get lost. I think it would tidy things up a lot if we either got rid of all the specialized exceptions and stuck with a single one like SimulationError, or required FLINTException subclasses to override what() or some other method that rolls up all the details into some user or developer-friendly text.
There's a fair amount of flexibility for fixing this issue, steps would basically be:
- have a look through the code (i.e. spatialtiledlocaldomaincontroller) and notice how ugly the exception stuff currently is
- propose a strategy for improving the situation: could be one of my suggestions above or something completely different, but probably best to let people have a look before investing effort into coding
- implement whatever solution you come up with
from flint.
Hey @mfellows @aornugent Can I be assigned this issue, it has been inactive for a while and I think I can implement my solution here.
from flint.
That's fine - could you please also coordinate with @AlkaDas991 so that you can both learn together? I'll connect you on Slack.
from flint.
Hi @mfellows, I discussed this with @aornugent and it would be great if you look into this as well.
So I have thought of shifting all the boost::get_error_info and _spaciallocationinfo parts of SimulationError and LocalDomainError to flintexception.h that way it'll tidy up the spacialtiledlocaldomaincontroller.cpp file as these try/catch blocks have been used everywhere in that file. This way the exceptions.h file and flintexception.h file will have a similar layout and it'll be easier for a developer to go through this file.
from flint.
Related Issues (20)
- Add video link, Remove dead links, Reduce grammatical errors. HOT 2
- Fix tables in Module wiki HOT 11
- Known issues section for FLINT installation. HOT 3
- Some links in the FLINT document is not working. HOT 11
- Understanding the reason for an instruction HOT 6
- Making FLINT understandable to Users and New Contributors HOT 2
- BLD: `Dockerfile.base.ubuntu.18.04` build currently fails HOT 1
- improving formatting of last section of readme HOT 2
- Update license of FLINT to latest version HOT 1
- extendable land unit area concept. HOT 7
- Add Welcome Bot to create an inclusive environment for new contributors HOT 1
- Repository Missing Description HOT 1
- Error in setting up FLINT
- Update version numbers for CMake HOT 3
- Docker build command for base container does not work HOT 3
- Updation of commands to install vcpkg packages in README.md HOT 1
- Error in installing FLINT HOT 5
- Missing Outputs of Modules under Module Science in Wiki Section.
- Add links to installation videos and fix some links in the README.md of the develop branch HOT 1
- Adding images to the wiki section HOT 2
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 flint.