Merge pull request #793 from harshavardhana/pr_out_use_command_not_found_helper

use command not found helper
master
Harshavardhana 10 years ago
commit 28d9565400
  1. 5
      main.go
  2. 4
      pkg/donut/donut-v2.go
  3. 2
      pkg/server/minhttp/http.go

@ -143,6 +143,11 @@ VERSION:
{{$key}}:
{{$value}}
{{end}}
`
app.CommandNotFound = func(ctx *cli.Context, command string) {
Fatalf("Command not found: ‘%s’\n", command)
}
app.RunAndExitOnError()
}

@ -517,7 +517,7 @@ func (donut API) ListObjects(bucket string, resources BucketResourcesMetadata, s
resources.Maxkeys,
)
if err != nil {
return nil, BucketResourcesMetadata{IsTruncated: false}, probe.New(err)
return nil, BucketResourcesMetadata{IsTruncated: false}, err.Trace()
}
resources.CommonPrefixes = listObjects.CommonPrefixes
resources.IsTruncated = listObjects.IsTruncated
@ -604,7 +604,7 @@ func (donut API) ListBuckets(signature *Signature) ([]BucketMetadata, *probe.Err
if len(donut.config.NodeDiskMap) > 0 {
buckets, err := donut.listBuckets()
if err != nil {
return nil, probe.New(err)
return nil, err.Trace()
}
for _, bucketMetadata := range buckets {
results = append(results, bucketMetadata)

@ -49,7 +49,7 @@ func (a *app) listen() *probe.Error {
for _, s := range a.servers {
l, err := a.net.Listen("tcp", s.Addr)
if err != nil {
return probe.New(err)
return err.Trace()
}
if s.TLSConfig != nil {
l = tls.NewListener(l, s.TLSConfig)

Loading…
Cancel
Save