Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
db94448d
Commit
db94448d
authored
Sep 23, 2022
by
Kevin Puetz
Committed by
Alexandre Julliard
Sep 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Only set EXCEPINFO strings for cases that map_hres translated.
Add test for E_UNEXPECTED.
parent
d8a03ae6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
interp.c
dlls/vbscript/interp.c
+7
-4
run.c
dlls/vbscript/tests/run.c
+26
-0
No files found.
dlls/vbscript/interp.c
View file @
db94448d
...
...
@@ -2498,10 +2498,13 @@ HRESULT exec_script(script_ctx_t *ctx, BOOL extern_caller, function_t *func, vbd
}
ctx
->
ei
.
scode
=
hres
;
if
(
!
ctx
->
ei
.
bstrSource
)
ctx
->
ei
.
bstrSource
=
get_vbscript_string
(
VBS_RUNTIME_ERROR
);
if
(
!
ctx
->
ei
.
bstrDescription
)
ctx
->
ei
.
bstrDescription
=
get_vbscript_error_string
(
hres
);
if
(
HRESULT_FACILITY
(
hres
)
==
FACILITY_VBS
)
{
if
(
!
ctx
->
ei
.
bstrSource
)
ctx
->
ei
.
bstrSource
=
get_vbscript_string
(
VBS_RUNTIME_ERROR
);
if
(
!
ctx
->
ei
.
bstrDescription
)
ctx
->
ei
.
bstrDescription
=
get_vbscript_error_string
(
hres
);
}
if
(
exec
.
resume_next
)
{
unsigned
stack_off
;
...
...
dlls/vbscript/tests/run.c
View file @
db94448d
...
...
@@ -2477,6 +2477,32 @@ static void test_callbacks(void)
free_ei
(
&
ei
);
IActiveScriptError_Release
(
error1
);
store_script_error
=
&
error1
;
SET_EXPECT
(
OnScriptError
);
hres
=
parse_script_ar
(
"throwException &h8000FFFF&"
);
ok
(
hres
==
E_UNEXPECTED
,
"got error: %08lx
\n
"
,
hres
);
CHECK_CALLED
(
OnScriptError
);
memset
(
&
ei
,
0xcc
,
sizeof
(
ei
));
hres
=
IActiveScriptError_GetExceptionInfo
(
error1
,
&
ei
);
ok
(
hres
==
S_OK
,
"GetExceptionInfo returned %08lx
\n
"
,
hres
);
ok
(
!
ei
.
wCode
,
"wCode = %x
\n
"
,
ei
.
wCode
);
ok
(
!
ei
.
wReserved
,
"wReserved = %x
\n
"
,
ei
.
wReserved
);
if
(
is_english
)
{
ok
(
!
ei
.
bstrSource
,
"bstrSource = %s
\n
"
,
wine_dbgstr_w
(
ei
.
bstrSource
));
ok
(
!
ei
.
bstrDescription
,
"bstrDescription = %s
\n
"
,
wine_dbgstr_w
(
ei
.
bstrDescription
));
}
ok
(
!
ei
.
bstrHelpFile
,
"bstrHelpFile = %s
\n
"
,
wine_dbgstr_w
(
ei
.
bstrHelpFile
));
ok
(
!
ei
.
dwHelpContext
,
"dwHelpContext = %lx
\n
"
,
ei
.
dwHelpContext
);
ok
(
!
ei
.
pvReserved
,
"pvReserved = %p
\n
"
,
ei
.
pvReserved
);
ok
(
!
ei
.
pfnDeferredFillIn
,
"pfnDeferredFillIn = %p
\n
"
,
ei
.
pfnDeferredFillIn
);
ok
(
ei
.
scode
==
E_UNEXPECTED
,
"scode = %lx
\n
"
,
ei
.
scode
);
free_ei
(
&
ei
);
IActiveScriptError_Release
(
error1
);
}
static
void
test_gc
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment