| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| // Source: errors.vdl |
| |
| package xproxy |
| |
| import ( |
| // VDL system imports |
| "v.io/v23/context" |
| "v.io/v23/i18n" |
| "v.io/v23/verror" |
| ) |
| |
| var ( |
| ErrNotListening = verror.Register("v.io/x/ref/services/xproxy/xproxy.NotListening", verror.NoRetry, "{1:}{2:} Proxy is not listening on any endpoints.") |
| ErrUnexpectedMessage = verror.Register("v.io/x/ref/services/xproxy/xproxy.UnexpectedMessage", verror.NoRetry, "{1:}{2:} Unexpected message of type{:3}") |
| ErrFailedToResolveToEndpoint = verror.Register("v.io/x/ref/services/xproxy/xproxy.FailedToResolveToEndpoint", verror.NoRetry, "{1:}{2:} Failed to resolve '{3}' to endpoint") |
| ErrProxyAlreadyClosed = verror.Register("v.io/x/ref/services/xproxy/xproxy.ProxyAlreadyClosed", verror.NoRetry, "{1:}{2:} Proxy has already been closed") |
| ErrProxyResponse = verror.Register("v.io/x/ref/services/xproxy/xproxy.ProxyResponse", verror.NoRetry, "{1:}{2:} proxy returned{:3}") |
| ) |
| |
| func init() { |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrNotListening.ID), "{1:}{2:} Proxy is not listening on any endpoints.") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrUnexpectedMessage.ID), "{1:}{2:} Unexpected message of type{:3}") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrFailedToResolveToEndpoint.ID), "{1:}{2:} Failed to resolve '{3}' to endpoint") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrProxyAlreadyClosed.ID), "{1:}{2:} Proxy has already been closed") |
| i18n.Cat().SetWithBase(i18n.LangID("en"), i18n.MsgID(ErrProxyResponse.ID), "{1:}{2:} proxy returned{:3}") |
| } |
| |
| // NewErrNotListening returns an error with the ErrNotListening ID. |
| func NewErrNotListening(ctx *context.T) error { |
| return verror.New(ErrNotListening, ctx) |
| } |
| |
| // NewErrUnexpectedMessage returns an error with the ErrUnexpectedMessage ID. |
| func NewErrUnexpectedMessage(ctx *context.T, msgType string) error { |
| return verror.New(ErrUnexpectedMessage, ctx, msgType) |
| } |
| |
| // NewErrFailedToResolveToEndpoint returns an error with the ErrFailedToResolveToEndpoint ID. |
| func NewErrFailedToResolveToEndpoint(ctx *context.T, name string) error { |
| return verror.New(ErrFailedToResolveToEndpoint, ctx, name) |
| } |
| |
| // NewErrProxyAlreadyClosed returns an error with the ErrProxyAlreadyClosed ID. |
| func NewErrProxyAlreadyClosed(ctx *context.T) error { |
| return verror.New(ErrProxyAlreadyClosed, ctx) |
| } |
| |
| // NewErrProxyResponse returns an error with the ErrProxyResponse ID. |
| func NewErrProxyResponse(ctx *context.T, msg string) error { |
| return verror.New(ErrProxyResponse, ctx, msg) |
| } |