cropped Error Message

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2011   #1
cropped Error Message

Hi everyone.

Here is the situation:
I get some pretty big error messages raised by Python and moved with the help of a COM server over to MaxScript. The error message gets cropped, when using GetCurrentException() or caused inside a rollout. Anyone knows a solution for that issue?
Here comes some example code for you:


msg = "-- Runtime error: OLEObject method call failed:  \
Error Message 1: Unexpected Python Error: Traceback (most recent call last):  \
  File \"C:\Python26\lib\site-packages\win32com\server\policy.py\", line 277, in _Invoke_  \
    return self._invoke_(dispid, lcid, wFlags, args)  \
  File \"C:\Python26\lib\site-packages\win32com\server\policy.py\", line 282, in _invoke_   \
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)   \
  File \"C:\Python26\lib\site-packages\win32com\server\policy.py\", line 585, in _invokeex_   \
    return func(*args)   \
  File \"K:\source\Application\System\dd\distributor\manage  r.py\", line 111, in RunTask   \
    manager.runTask(taskName, file, mode, user, quiet, extraValues)   \
  File \"K:\source\Application\System\dd\distributor\manage  r.py\", line 62, in runTask   \
    jobs = task.createJobs()   \
  File \"K:\source\Application\System\dd\distributor\tasks.  py\", line 383, in createJobs   \
    return [os.path.expandvars(str(jobOn)) for jobOn in jobsCopy]   \
  File \"K:\source\Application\System\dd\distributor\tasks.  py\", line 47, in __repr__   \
    return \"%s%s\" % (self.exe, self._cat())   \
  File \"K:\source\Application\System\dd\distributor\tasks.  py\", line 56, in _cat   \
    str += self._renderArg(argOn)   \
  File \"K:\source\Application\System\dd\distributor\tasks.  py\", line 126, in _renderArg   \
    str += \":\" + self._renderElem(arg[\"value\"])   \
  File \"K:\source\Application\System\dd\distributor\tasks.  py\", line 137, in _renderElem   \
    return \"%s\" % (elem)   \
  File \"K:\source\Application\System\dd\distributor\types.  py\", line 271, in __repr__   \
    raise TypeExtraValueNAN(e)  \
TypeExtraValueNAN: An extra value holds the value '%s', which is not a number."

-- 1.
"\n1."
throw msg

-- 2.
"\n2."
try (
	throw msg
)
catch(
	GetCurrentException()
)

-- 3.
"\n3."
rollout test "was"
(
	on test open do
	(
		throw msg
	)
)
CreateDialog test


And here are the results:

1.
-- Error occurred in anonymous codeblock; filename: K:\source\Development\Max\Structs\cfLog\; position: 1831; line: 29
-- Runtime error: -- Runtime error: OLEObject method call failed:  \
Error Message 1: Unexpected Python Error: Traceback (most recent call last):  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_  \
    return self._invoke_(dispid, lcid, wFlags, args)  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_   \
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)   \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_   \
    return func(*args)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 111, in RunTask   \
    manager.runTask(taskName, file, mode, user, quiet, extraValues)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 62, in runTask   \
    jobs = task.createJobs()   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 383, in createJobs   \
    return [os.path.expandvars(str(jobOn)) for jobOn in jobsCopy]   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 47, in __repr__   \
    return "%s%s" % (self.exe, self._cat())   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 56, in _cat   \
    str += self._renderArg(argOn)   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 126, in _renderArg   \
    str += ":" + self._renderElem(arg["value"])   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 137, in _renderElem   \
    return "%s" % (elem)   \
  File "K:\source\Application\System\dd\distributor	ypes.py", line 271, in __repr__   \
    raise TypeExtraValueNAN(e)  \
TypeExtraValueNAN: An extra value holds the value '%s', which is not a number.

2.
"-- Runtime error: -- Runtime error: OLEObject method call failed:  \
Error Message 1: Unexpected Python Error: Traceback (most recent call last):  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_  \
    return self._invoke_(dispid, lcid, wFlags, args)  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_   \
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)   \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_   \
    return func(*args)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 111, in RunTask   \
    manager.runTask(taskName, file, mode, user, quiet, extraValues)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 62, in runTask   \
    jobs = task.createJobs()   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 383, in createJobs   \
    return [os.path.expandvars(str(jobOn)) for jobOn in jobsCop*Ű"

3.
Rollout:test
-- Error occurred in test.open(); filename: K:\source\Development\Max\Structs\cfLog\; position: 1980; line: 46
--  Frame:
>> MAXScript Rollout Handler Exception: -- Runtime error: -- Runtime error: OLEObject method call failed:  \
Error Message 1: Unexpected Python Error: Traceback (most recent call last):  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_  \
    return self._invoke_(dispid, lcid, wFlags, args)  \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_   \
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)   \
  File "C:\Python26\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_   \
    return func(*args)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 111, in RunTask   \
    manager.runTask(taskName, file, mode, user, quiet, extraValues)   \
  File "K:\source\Application\System\dd\distributor\manage  r.py", line 62, in runTask   \
    jobs = task.createJobs()   \
  File "K:\source\Application\System\dd\distributor	asks.py", line 383, in createJobs   \
    return [os.path.expandvars(str(jobOn)) for jobOn in jobsCopŔ× <<


Only the first case works. What do you think? Any possibility to get the full error for case 2 and 3?

Thanks a lot,
Pixelbaker

Last edited by PixelBaker : 02 February 2011 at 01:59 PM.
 
Old 02 February 2011   #2
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:21 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.