Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass on faults from methods. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesfcarter
Copy link

This allows services to generate their own faults. eg

type HelloService struct{}

func (h *HelloService) Say(r *http.Request, args *struct{Who string}, reply *struct{Message string}) error {
    log.Println("Say", args.Who)
    if args.Who == "poop" {
        return xml.Fault{
            Code: 90,
            String: "I refuse to say rude words!",
        }
    }
    reply.Message = "Hello, " + args.Who + "!"
    return nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant