Giter VIP home page Giter VIP logo

Comments (8)

cyrille-artho avatar cyrille-artho commented on July 28, 2024

Refactored some uses in the commits shown above. 8 instances left.

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

For cases with deeply nested method calls, exceptions would be a better way of propagating error codes (as that would not require inserting "return" statements everywhere).

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

I'll review the earlier changes w.r.t. that and convert return statements to exceptions if appropriate, and will then move on to the forked repo.

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

Something was not done so well (my mistake...); check issue #45.

from modbat.

AlexandreFournel avatar AlexandreFournel commented on July 28, 2024

Existing changes to change again (to use exceptions):
14c1fe8

  • ConfigMgr.scala: main
  • ConfigMgr.scala: parseArgs incl. return type
  • Main.main: use of parseArgs

03899e8
Already modified.

24a882f

Remaining uses of System.exit

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

Return codes left: ConfigMgr.scala (both 0 and 1): replace "return 1" with exception, remove "return 0", and make "run" have no return parameters; Main.scala: replace "return 1" with exceptions.

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

System.exit: a couple left; try:
find . -name '*.scala' | xargs grep 'System.exit'

from modbat.

cyrille-artho avatar cyrille-artho commented on July 28, 2024

Remaining open points:

  • Modbat.explore should not have return code
  • Main.run should not have return code
  • Main.main should not not use return code of run (perhaps pending in a current PR?)

from modbat.

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.