Skip to content

Commit

Permalink
Renamed StreamCutError to StreamError
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Dec 15, 2023
1 parent a4c94cb commit e949981
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/guillotine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Executor:
stream.interpret(proc).map(_.s).foreach(buf.append(_))
buf.toString

given dataStream(using streamCut: Raises[StreamCutError]): Executor[LazyList[Bytes]] =
given dataStream(using streamCut: Raises[StreamError]): Executor[LazyList[Bytes]] =
proc => Readable.inputStream.read(proc.getInputStream.nn)

given exitStatus: Executor[ExitStatus] = _.waitFor() match
Expand Down Expand Up @@ -126,18 +126,18 @@ object Process:
: Appendable[Process[?, ?], ChunkType]^{writable} =
(process, stream) => process.stdin(stream)

given appendableText(using streamCut: Raises[StreamCutError]): Appendable[Process[?, ?], Text]^{streamCut} =
given appendableText(using streamCut: Raises[StreamError]): Appendable[Process[?, ?], Text]^{streamCut} =
(process, stream) => process.stdin(stream.map(_.sysBytes))

class Process[+ExecType <: Label, ResultType](process: java.lang.Process) extends ProcessRef:
def pid: Pid = Pid(process.pid)
def alive: Boolean = process.isAlive
def attend(): Unit = process.waitFor()

def stdout()(using Raises[StreamCutError]): LazyList[Bytes] =
def stdout()(using Raises[StreamError]): LazyList[Bytes] =
Readable.inputStream.read(process.getInputStream.nn)

def stderr()(using Raises[StreamCutError]): LazyList[Bytes] =
def stderr()(using Raises[StreamError]): LazyList[Bytes] =
Readable.inputStream.read(process.getErrorStream.nn)

def stdin
Expand Down

0 comments on commit e949981

Please sign in to comment.