Skip to content

Commit

Permalink
catch namespace load throwables
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Jeandet committed Mar 27, 2017
1 parent ddf58e7 commit 71bc6fc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,10 @@ class MaterializeWorkflowDescriptorActor(serviceRegistryActor: ActorRef,
} else {
List.empty
}
// This .get is ok because we're already in a try/catch.
validateWorkflowNameLengths(WdlNamespaceWithWorkflow.load(w.wdlSource, importResolvers).get)
WdlNamespaceWithWorkflow.load(w.wdlSource, importResolvers) match {
case Failure(e) => s"Unable to load namespace from workflow: ${e.getMessage}".invalidNel
case Success(namespace) => validateWorkflowNameLengths(namespace)
}
}
} catch {
case e: Exception => s"Unable to load namespace from workflow: ${e.getMessage}".invalidNel
Expand Down

0 comments on commit 71bc6fc

Please sign in to comment.