[ 
https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432854#comment-13432854
 ] 

Alan Foster edited comment on CAMEL-5407 at 8/13/12 9:37 AM:
-------------------------------------------------------------

I have attached the patch for this.

I added the option as 'allowNullBody', following a similar naming convention of 
a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file 
writing. If set to true then an empty file will be created, when set to false 
an a GenericFileWriteException of 'Cannot write null body to file.' will be 
thrown. If the `fileExist` option is set to Override, then the file will be 
truncated, and if set to `append` it will be unchanged
                
      was (Author: alanfoster):
    My patch for this.

I added the option as 'allowNullBody', following a similar naming convention of 
a different component
                  
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type 
> converter exception.
> We could also consider an option to the file producer, to silently ignore 
> writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to