Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jz5
Created July 24, 2014 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jz5/d7f78b39b956f10c370f to your computer and use it in GitHub Desktop.
Save jz5/d7f78b39b956f10c370f to your computer and use it in GitHub Desktop.
Sub Main()
Dim t = Task.Factory.StartNew(
Async Function()
Dim msg = GetMessage()
Await Tweet(msg)
End Function).Unwrap
Try
t.Wait()
Catch aEx As AggregateException
For Each e In aEx.InnerExceptions
Console.WriteLine(e.Message)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment