Giter Club home page Giter Club logo

Comments (4)

zvonimir avatar zvonimir commented on June 2, 2024

I guess we should simply exit with some reasonable error message when something like this happens. Yes?

from smack.

michael-emmi avatar michael-emmi commented on June 2, 2024

Well I think there are two things: (1) signaling a problem, and (2) trying to report what/why. At the very least, we should do (1) with sys.exit(X) with some non-zero X, or raise some exception -- I'm no python expert so I don't know what's more appropriate. We could then augment this with some message to address (2), for a less minimal solution. At any rate, these sorts of problems should propagate themselves all the way up though all wrapper scripts.

from smack.

zvonimir avatar zvonimir commented on June 2, 2024

Exiting with a nice error message seems to be the appropriate solution for our relatively simple scripts. I will implement this when I get a chance.

from smack.

michael-emmi avatar michael-emmi commented on June 2, 2024

Perhaps something like the following would work well -- here p = subprocess.Popen(..)

if p.returncode != 0:
  print >> sys.stderr, "LLVM/SMACK encountered an error:"
  print >> sys.stderr, output[0:1000], "... (output truncated)"
  sys.exit("LLVM/SMACK returned %s" % p.returncode)

Which would kill whichever script is running while spitting out a bit of the problem.

from smack.

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.