Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • GraceDB Client GraceDB Client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • IGWN Computing and Software
  • GraceDB
  • GraceDB ClientGraceDB Client
  • Merge requests
  • !3

Merged
Created Jan 04, 2017 by Leo Pound Singer@leo-singerContributor

Do not call sys.exit in ligo.gracedb.rest module

  • Overview 0
  • Commits 1
  • Changes 2

The ligo.gracedb.rest module should raise exceptions instead of calling sys.exit() so that it is possible to inspect stack traces. Generally, methods in importable modules should not call sys.exit(), just as C library functions should not call exit().

This change turns output_and_die into a class method that can be overridden in the classes in the ligo.gracedb.cli module. However, ideally we should get rid of the output_and_die method altogether, raise ordinary exceptions in ligo.gracedb.rest, and handle user-friendly rendering of errro messages in ligo.gracedb.cli.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: no-exit-in-rest-module