Changes between Version 60 and Version 61 of RepyV2API

Changes between Version 60 and Version 61 of RepyV2API

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 60 and Version 61 of RepyV2API

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 60 and Version 61 of RepyV2API

Show
Ignore:
Timestamp:
12/24/09 12:15:18 (10 years ago)
Author:
cemeyer
Comment:

Add some new exceptions for XXXExceptions

Legend:

Unmodified
Added
Removed
Modified
  • RepyV2API

    v60 v61  
    444444        FileNotFoundError if the file does not exist and create is false. 
    445445 
    446         XXXException if the file is already opened.   (This is handled at the system library level) 
     446        FileAlreadyOpenError if the file is already opened.   (This is handled at the system library level) 
    447447 
    448448        An internal error will cause the program to terminate if the file has incorrect permissions or similar errors occur. 
     
    462462---- 
    463463 
    464 Close the file. A closed file cannot be read or written any more. Any operation which requires that the file be open will raise a ~~!ValueError~~ XXXException after the file has been closed. ~~Calling close() more than once is allowed.~~ 
     464Close the file. A closed file cannot be read or written any more. Any operation which requires that the file be open will raise a ValueError after the file has been closed. ~~Calling close() more than once is allowed.~~ 
    465465 
    466466'''Conrad: Python raises !ValueError in such situations. Any reason we think this should change? Also: I think (for consistency) we should raise !ValueError if they try to call ''any'' method on a closed file -- close() included.''' 
     467 
     468'''Conrad (2009-12-24): un-struck ValueError above until/unless we decide it's not appropriate.''' 
    467469 
    468470 * Doc string: 
     
    510512      TypeError if offset or sizelimit is not a non-zero integer. 
    511513 
    512       XXXException if trying to read past the end of the file 
     514      SeekPastEndOfFileError if trying to read past the end of the file 
    513515 
    514516   <Side Effects> 
     
    548550      TypeError if offset isn't an non-negative integer or data isn't a string. 
    549551 
    550       XXXException if the offset is past the end of the file. 
     552      SeekPastEndOfFileError if the offset is past the end of the file. 
    551553 
    552554   <Side Effects> 
     
    606608      TypeError/ValueError if the filename param isn't the right type or is an invalid filename 
    607609 
    608       '''Justin: ??? What if the file is open???''' 
     610      FileInUseError if the file is already open. 
    609611 
    610612   <Side Effects> 
     
    718720 
    719721   <Exceptions> 
    720       XXXException if release() is called on an unlocked lock. '''Conrad: Do we want to raise an exception in this case?''' 
     722      LockDoubleReleaseError if release() is called on an unlocked lock. 
    721723 
    722724   <Side Effects> 
     
    901903     LocalIPChanged (descends NetworkError) if the local system connection is broken because the local system changes its IP address. 
    902904    
    903      XXXException if the call would block. 
     905     SocketWouldBlockException if the call would block. 
    904906 
    905907   <Side Effects> 
     
    937939     LocalIPChanged if the local system connection is broken because the local system changes its IP address. 
    938940 
    939      XXXException if the call would block.    
     941     SocketWouldBlockException if the call would block.    
    940942 
    941943   <Side Effects> 
     
    11871189 
    11881190   <Exceptions> 
    1189      If the context cannot be converted to a !SafeDict due to safety issues, an XXXException 
    1190      will be raised. Any exception that the code raises during evaluation will not be 
    1191      caught. '''Conrad: do we care what exception this is? Should user code expect to catch/handle this?''' 
     1191     If the context cannot be converted to a !SafeDict due to safety issues, an 
     1192     internal error will be raised and the program will end. Any exception that 
     1193     the code raises during evaluation will not be caught. 
    11921194 
    11931195   <Side Effects>