Skip to content

Commit bdc75cc

Browse files
committed
Make exception more explicit
1 parent b8ebc50 commit bdc75cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/models/dataset/DatasetService.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class DatasetService @Inject()(organizationDAO: OrganizationDAO,
391391
attachmentsOpt,
392392
)
393393
}
394-
case None => ???
394+
case None => throw new IllegalStateException(s"Data layer ${layer.name} has no data format defined.")
395395
}
396396
case AbstractSegmentationLayer(name,
397397
_,
@@ -477,7 +477,8 @@ class DatasetService @Inject()(organizationDAO: OrganizationDAO,
477477
attachmentsOpt
478478
)
479479
}
480-
case None => ???
480+
case None =>
481+
throw new IllegalStateException(s"Data layer ${layer.name} has no data format defined.")
481482
}
482483
case _ => throw new NotImplementedError("DataLayer type mismatch (unreachable)")
483484
}

app/models/dataset/WKRemoteDataStoreClient.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import controllers.RpcTokenHolder
1717
import play.api.libs.json.JsObject
1818
import play.utils.UriEncoding
1919
import com.scalableminds.util.objectid.ObjectId
20-
import com.scalableminds.webknossos.datastore.models.datasource.inbox.InboxDataSourceLike
2120

2221
import scala.concurrent.ExecutionContext
2322
import scala.concurrent.duration.DurationInt

0 commit comments

Comments
 (0)