Skip to content

Commit f06ebeb

Browse files
committed
better exceptions
1 parent 5da8cf8 commit f06ebeb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/scala/ldbc/snb/datagen/transformation/transform/ConvertDates.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ object ConvertDates {
2828
implicit def batchedConvertDates[M <: Mode](implicit ev: BatchedEntity =:= M#Layout) = new ConvertDates[M] {
2929
override def transform(input: In): Out = {
3030
if (input.definition.useTimestamp) {
31-
throw new IllegalArgumentException("Already using timestamp for dates")
31+
throw new AssertionError("Already using timestamp for dates")
3232
}
3333
val modifiedEntities = input.entities.map { case (tpe, layout) => tpe -> {
3434
val be = layout.asInstanceOf[BatchedEntity]
@@ -50,7 +50,7 @@ object ConvertDates {
5050
implicit def simpleConvertDates[M <: Mode](implicit ev: DataFrame =:= M#Layout) = new ConvertDates[M] {
5151
override def transform(input: In): Out = {
5252
if (input.definition.useTimestamp) {
53-
throw new IllegalArgumentException("Already using timestamp for dates")
53+
throw new AssertionError("Already using timestamp for dates")
5454
}
5555

5656
val modifiedEntities = input.entities

src/main/scala/ldbc/snb/datagen/transformation/transform/ExplodeAttrs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import shapeless.lens
1111
object ExplodeAttrs extends Transform[Mode.Raw.type, Mode.Raw.type] {
1212
override def transform(input: In): Out = {
1313
if (input.definition.isAttrExploded) {
14-
throw new IllegalArgumentException("Attributes already exploded in the input graph")
14+
throw new AssertionError("Attributes already exploded in the input graph")
1515
}
1616

1717
def explodedAttr(attr: Attr, node: DataFrame, column: Column) =

src/main/scala/ldbc/snb/datagen/transformation/transform/ExplodeEdges.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import shapeless.lens
1313
object ExplodeEdges extends Transform[Mode.Raw.type, Mode.Raw.type] {
1414
override def transform(input: In): Out = {
1515
if (input.definition.isEdgesExploded) {
16-
throw new IllegalArgumentException("Edges already exploded in the input graph")
16+
throw new AssertionError("Edges already exploded in the input graph")
1717
}
1818
val entities = input.entities
1919

src/main/scala/ldbc/snb/datagen/transformation/transform/RawToBiTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ case class RawToBiTransform(mode: BI, simulationStart: Long, simulationEnd: Long
2323
case "day" => "yyyy-MM-dd"
2424
case "hour" => "yyyy-MM-dd'T'hh"
2525
case "minute" => "yyyy-MM-dd'T'hh:mm"
26-
case _ => throw new IllegalStateException("Unrecognized partition key")
26+
case _ => throw new IllegalArgumentException("Unrecognized partition key")
2727
}
2828

2929
private def notDerived(entityType: EntityType): Boolean = entityType match {

0 commit comments

Comments
 (0)