Opened 14 years ago
Closed 14 years ago
#1762 closed Bug (No Bug)
With ... EndWith crashes instead of Error.
Reported by: | Kip | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.6.1 | Severity: | None |
Keywords: | with object | Cc: |
Description
$oObject.MemberDoesntExist() ; results in:
; ==> The requested action with this object has failed.:
; as expected.
With $oObject
.MemberDoesntExist() ; crashes
EndWith
Attachments (0)
Change History (4)
comment:1 follow-up: ↓ 2 Changed 14 years ago by MrCreatoR <mscreator@…>
comment:2 in reply to: ↑ 1 Changed 14 years ago by crashdemons
This is an old report, but it was still marked as 'new', so meh...
Replying to MrCreatoR <mscreator@…>:
No crash for me:
$oObject = ObjCreate("Scripting.FileSystemObject") With $oObject .MemberDoesntExist() EndWith
I get the same thing as the OP with *your code*:
>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Username\Desktop\New AutoIt v3 Script (2).au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>14:59:58 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86) >Running AU3Check (1.54.19.0) from:C:\Program Files\AutoIt3 +>14:59:58 AU3Check ended.rc:0 >Running:(3.3.6.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Username\Desktop\New AutoIt v3 Script (2).au3" C:\Documents and Settings\Username\Desktop\New AutoIt v3 Script (2).au3 (4) : ==> The requested action with this object has failed.: .MemberDoesntExist() .MemberDoesntExist()^ ERROR ->15:00:03 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 7.280
But, I've always gotten an error like this when using invalid members/methods and assumed you just don't do it unless you have an error handler.
No crash with this:
$oMyError = ObjEvent ( "AutoIt.Error", "MyErrFunc" ) $oObject = ObjCreate("Scripting.FileSystemObject") With $oObject .MemberDoesntExist() EndWith Func MyErrFunc() ConsoleWrite("-> AutoItCOM Test"&@CRLF&"-> We intercepted a COM Error !"&@CRLF& _ "-> err.number is: "&@TAB&hex($oMyError.number,8)&@CRLF& _ "-> err.scriptline is: "&@TAB&$oMyError.scriptline) Endfunc
So, not to be mean, but: I'm not really sure what the issue is, since I thought that's what the COM Error Handler was for - handling COM Errors.
comment:3 Changed 14 years ago by ggreiter@…
Ticket can be closed - I used round brackets where I should have used [].
comment:4 Changed 14 years ago by Jos
- Resolution set to No Bug
- Status changed from new to closed
As said in the other BUG report from you. Stop posting issues here before posting your issues in the forum to see whether it is a pilot error.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
No crash for me: