add additional error handling to spark.dart
merge to master
Merge pull request #1134 from devoncarew/devoncarew_spark_error_handling

add additional error handling to spark.dart