hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Francisoud <benjamin.francis...@joost.com>
Subject Re: Proposal for error handling in Pig
Date Fri, 29 Feb 2008 15:04:45 GMT
About Internal Errors, do you consider such code to be part of them ?

public void something(Object object) {
    if (o == null) {
        throw new IllegalArgumentException("Object can't be null");
    }
    ...
}

class StateMachine {
    public void start() {...}
    public void end() {
        if (startCalled == false) {
            throw new IllegalStateException("You didn't call start()");
        }
    }
}

About user errors, how should we handle them ?
The way I proposed in PIG-100 (1) ?

try {
    plan = parser.Parse();
} catch (ParseException e) {
    log.error(e.getMessage());
    log.debug(e);
}



[1] 
https://issues.apache.org/jira/browse/PIG-100?focusedCommentId=12573218#action_12573218

Olga Natkovich a écrit :
> Pig developers,
>  
> We had many patches submitted that are trying to improve error handling.
> This is really great as many users ask exactly for that. So it seems
> timely to establish some guidelines on how errors should be handled,
> propagated, delivered, etc.
>  
> I put together a proposal to start the discussion. Please, review and
> comment. Once we have an agreement we would need to add the missing
> pieces to deploy it into Pig and then review the existing patches to
> make sure they follow the proposed practice.
>  
> http://wiki.apache.org/pig/PigDeveloperCookbook
>  
> I have also started a general document called Pig Developer Cookbook
> where we can keep track of development patterns we as a community want
> to follow.
>  
> Thanks again for everybody's contributions!
>  
> Olga
>
>   


Mime
View raw message