Permalink
Browse files

Report errors in example program.

  • Loading branch information...
1 parent 3bbf45a commit e3b9a2f23f0ef386367a53e3b3e29db81f2ed942 @dustin dustin committed Jan 9, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 example/prowl.go
View
7 example/prowl.go
@@ -2,7 +2,9 @@ package main
import (
"flag"
+ "fmt"
"github.com/rem7/goprowl"
+ "os"
"strings"
)
@@ -30,5 +32,8 @@ func main() {
Url: url,
}
- p.Push(&n)
+ if err := p.Push(&n); err != nil {
+ fmt.Fprintf(os.Stderr, "Error sending message: %v\n", err)
+ os.Exit(1)
+ }
}

0 comments on commit e3b9a2f

Please sign in to comment.