Wiki

Ticket #266 (closed enhancement: fixed)

Opened 7 years ago

Last modified 4 years ago

Returning different exit codes from the compiler

Reported by: todd.a Owned by: Charles
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Currently when the Cobra compiler is run 0 is returned for all results: successful compilation, unsuccessful compilation, internal error, etc.

Proposal
Return different values depending on the state that the compiler exited.

Change History

Changed 6 years ago by hopscc

  • owner set to Charles
  • status changed from new to assigned

Can probably close this
When try it using bash a clean compilation returns code 0
A failed compilation returns code 1

585 xx:...hops/src/cobra/Tst> cobc0 001.cobra; echo $?
Hi
0
586 xx:...hops/src/cobra/Tst> cobc0 001e.cobra; echo $?
001e.cobra(5): error: Cannot find "c". There are members with similar names including ".cue.init", ".getHashCode", ".memberwiseClone" and ".referenceEquals".
Compilation failed - 1 error, 0 warnings
Not running due to errors above.
1

Changed 4 years ago by nerdzero

  • status changed from assigned to closed
  • resolution set to fixed

Confirmed also on Windows that 0 is returned for successful compilation, 1 for failed compilations, and some large negative number (-532462766) for internal exceptions.

Note: See TracTickets for help on using tickets.