-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* container state * docker exceptions * wip
- Loading branch information
Showing
10 changed files
with
135 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...src/main/scala/izumi/distage/model/exceptions/runtime/NonCriticalIntegrationFailure.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package izumi.distage.model.exceptions.runtime | ||
|
||
trait NonCriticalIntegrationFailure { this: Throwable => | ||
def asThrowable: Throwable = this | ||
} |
10 changes: 0 additions & 10 deletions
10
.../main/scala/izumi/distage/model/exceptions/runtime/ProvisioningIntegrationException.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../distage-framework-docker/src/main/scala/izumi/distage/docker/model/DockerException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package izumi.distage.docker.model | ||
|
||
import izumi.distage.docker.model.Docker.UnmappedPorts | ||
import izumi.distage.model.exceptions.runtime.NonCriticalIntegrationFailure | ||
|
||
sealed abstract class DockerException(message: String, cause: Throwable) extends RuntimeException(message, cause) with NonCriticalIntegrationFailure { | ||
def this(message: String) = this(message, null) | ||
} | ||
|
||
case class DockerFailureException(message: String, explanation: DockerFailureCause, cause: Throwable) extends DockerException(message) | ||
object DockerFailureException { | ||
def apply(message: String, explanation: DockerFailureCause): DockerFailureException = DockerFailureException(message, explanation, null) | ||
} | ||
|
||
case class DockerTimeoutException(message: String) extends DockerException(message) | ||
|
||
sealed trait DockerFailureCause | ||
|
||
object DockerFailureCause { | ||
case class Terminated(state: Docker.ContainerState) extends DockerFailureCause | ||
case class Throwed(cause: Throwable) extends DockerFailureCause | ||
case class MissingPorts(ports: UnmappedPorts) extends DockerFailureCause | ||
case object Bug extends DockerFailureCause | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters