Skip to content

Commit

Permalink
Removed unneeded errors from ProcessError
Browse files Browse the repository at this point in the history
There are several errors in ProcessError that are unused in the
ProcessMonitor. This commit removed unused errors with the
exception of ExecveError which is being used in ponylang#1180.
  • Loading branch information
kelcecil committed Oct 8, 2016
1 parent 580906c commit 3812189
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to the Pony compiler and standard library will be documented
### Changed

- `Stringable` interface no longer involves formatting (issue #1285)
- Remove unused error types from ProcessError (issue #1293)

## [0.4.0] - 2016-09-26

Expand Down
4 changes: 0 additions & 4 deletions packages/process/_test.pony
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,8 @@ class _ProcessClient is ProcessNotify
match err
| ExecveError => _h.fail("ProcessError: ExecveError")
| PipeError => _h.fail("ProcessError: PipeError")
| Dup2Error => _h.fail("ProcessError: Dup2Error")
| ForkError => _h.fail("ProcessError: ForkError")
| FcntlError => _h.fail("ProcessError: FcntlError")
| WaitpidError => _h.fail("ProcessError: WaitpidError")
| CloseError => _h.fail("ProcessError: CloseError")
| ReadError => _h.fail("ProcessError: ReadError")
| WriteError => _h.fail("ProcessError: WriteError")
| KillError => _h.fail("ProcessError: KillError")
| Unsupported => _h.fail("ProcessError: Unsupported")
Expand Down
13 changes: 1 addition & 12 deletions packages/process/process_monitor.pony
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ class ProcessClient is ProcessNotify
match err
| ExecveError => _env.out.print("ProcessError: ExecveError")
| PipeError => _env.out.print("ProcessError: PipeError")
| Dup2Error => _env.out.print("ProcessError: Dup2Error")
| ForkError => _env.out.print("ProcessError: ForkError")
| FcntlError => _env.out.print("ProcessError: FcntlError")
| WaitpidError => _env.out.print("ProcessError: WaitpidError")
| CloseError => _env.out.print("ProcessError: CloseError")
| ReadError => _env.out.print("ProcessError: ReadError")
| WriteError => _env.out.print("ProcessError: WriteError")
| KillError => _env.out.print("ProcessError: KillError")
| CapError => _env.out.print("ProcessError: CapError")
| Unsupported => _env.out.print("ProcessError: Unsupported")
else
_env.out.print("Unknown ProcessError!")
Expand Down Expand Up @@ -144,26 +141,18 @@ primitive _ONONBLOCK

primitive ExecveError
primitive PipeError
primitive Dup2Error
primitive ForkError
primitive FcntlError
primitive WaitpidError
primitive CloseError
primitive ReadError
primitive WriteError
primitive KillError
primitive Unsupported // we throw this on non POSIX systems
primitive CapError

type ProcessError is
( ExecveError
| CloseError
| Dup2Error
| FcntlError
| ForkError
| KillError
| PipeError
| ReadError
| Unsupported
| WaitpidError
| WriteError
Expand Down

0 comments on commit 3812189

Please sign in to comment.