473,383 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

builtin function compile exceptions thrown?

What exceptions (if any) can the python builtin compile() function
throw besides SyntaxError?

Jul 26 '06 #1
2 1516
James Thiele wrote:
What exceptions (if any) can the python builtin compile() function
throw besides SyntaxError?
- TypeError, if the parameters are wrong/too many/too few
- Any errors that a codec may raise, if there is an encoding
declaration, plus (pre 2.5) MemoryError if the encoding is
unknown.
- MemoryError, if you run out of memory
- SystemError, for various internal-error conditions

Regards,
Martin
Jul 27 '06 #2
Thank you,
James

Martin v. Löwis wrote:
James Thiele wrote:
What exceptions (if any) can the python builtin compile() function
throw besides SyntaxError?

- TypeError, if the parameters are wrong/too many/too few
- Any errors that a codec may raise, if there is an encoding
declaration, plus (pre 2.5) MemoryError if the encoding is
unknown.
- MemoryError, if you run out of memory
- SystemError, for various internal-error conditions

Regards,
Martin
Jul 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
10
by: Shayne Wissler | last post by:
I've overloaded the global new operator, so that I can, detect when I've run out of memory: extern void* operator new(size_t s) { void *r = malloc(s); if (!r && s) { fprintf(stderr, "Error: No...
4
by: Johannes Hansen | last post by:
What are the best practice on handling an exception caused by a Dispose method when its called from inside a loop? Wrap the entire loop in a try-catch or do the try-catch on each iteration to get...
2
by: felecha | last post by:
I learned about Exceptions in School, and now that I'm building my first real application on the job, I'm going through it trying to analyze it for all possible Exceptions so I can handle them...
5
by: Gerard | last post by:
Hi, Is it an option/idea to make the exceptions thrown be part of the signature of a function? - So I'll get a warning if I call a function and not handle one of the exceptions. - So I'll get...
14
by: joey.powell | last post by:
I am using VS2005 for a windows forms application. I need to be able to use a worker thread function to offload some processing from the UI thread. The worker thread will need access to a...
2
by: Zytan | last post by:
I know that WebRequest.GetResponse can throw WebException from internet tutorials. However in the MSDN docs: http://msdn2.microsoft.com/en-us/library/system.net.webrequest.getresponse.aspx It...
28
by: Jess | last post by:
Hello, It is said that if I implement a "swap" member function, then it should never throw any exception. However, if I implement "swap" non- member function, then the restriction doesn't...
12
by: raj s | last post by:
What is the advantage and disadvantage of using function declaration with exceptions specified. like foo()throws(char&)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.