Coder Social home page Coder Social logo

Comments (7)

AlkaDas991 avatar AlkaDas991 commented on June 25, 2024

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.

AlkaDas991 avatar AlkaDas991 commented on June 25, 2024

@Patamap can you please explain me a little bit about the issue

from flint.

aornugent avatar aornugent commented on June 25, 2024

@mfellows - could you please add a brief description to help @AlkaDas991? I know exception handling was one of your bugbears.

from flint.

mfellows avatar mfellows commented on June 25, 2024

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.

SlipperyGnome avatar SlipperyGnome commented on June 25, 2024

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.

aornugent avatar aornugent commented on June 25, 2024

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.

SlipperyGnome avatar SlipperyGnome commented on June 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.