| Issue 1: | Raise custom Exceptions instead of printing to stdout |
1 of 2
Next ›
|
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. In the blog models add:
calais_content_fields = [
('title', 'text/txt'), ('summary', 'text/html'),]
2. Analyze post where summary is blank
3. The following error is printed on the console
>>> OpenCalais Error: <Error Method="ProcessText"
calaisRequestID="de87f04c-0ed7-4614-125a-05363a81a413"
CreationDate="2009-12-17 23:47:17"
CalaisVersion="R4.2_7.1.1103.5"><Exception>content is invalid: 'Empty'
.</Exception></Error>
4. I am using mod_wsgi, get the following error:
IOError: sys.stdout access restricted by mod_wsgi
What is the expected output? What do you see instead?
1. A check added to see if "text" has some value before submitting it to
Calais and raise a Custom Exception that can be trapped by the process
initiating the call
2. It would be great if an exception is raised instead of a printing it out
to stdout - for other scenarios as well. I noticed that CalaisAPI traps the
exception and prints a meaningful message instead of raising it as an
exception further
What version of the product are you using? On what operating system?
I am using Django 1.1, DjangoCalais 0.10 on Ubuntu
Please provide any additional information below.
Dec 17, 2009
#1
day...@gmail.com
|