Skip to content

Instantly share code, notes, and snippets.

@ryandavidhartman
Last active August 29, 2015 14:22
Show Gist options
  • Save ryandavidhartman/6125a346e39d867d59e8 to your computer and use it in GitHub Desktop.
Save ryandavidhartman/6125a346e39d867d59e8 to your computer and use it in GitHub Desktop.
try_example4
def collectData(): Try[List[Data]] = {
val data = dataGetter()
if(data.length < 1)
throw new DataException("Data Collection Fails")
else
data
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment