Why not:
```scala
private var dataSource : Option[BoneCPDataSource] = None
def getConnection = dataSource.getOrElse(new SQLException("DataSource is not configured."))
```