Notifications
Clear all

[Closed] Disable output of MAXScript Listene,possible?

Hi all,
I am just wondering is that possible to disable output of MAXScript Listener when maxscript cause error?Just something like this:

(
test="123"
substring test 1 
)

will shows:
– Error occurred in anonymous codeblock; filename: D:\disable-maxscript linsener.ms; position: 33; line: 3
– Frame:
– Error occurred during fileIn in #D:\disable-maxscript linsener.ms; line number: 3
>> MAXScript FileIn Exception:
– Argument count error: substring wanted 3, got 2 <<

10 Replies

sure! just don’t make errors which cause their throwing

:shrug:
If a script has too many codes,sometimes has bugs,that will cause error,I don’t think anyone can avoid this,so I am looking for a solution,but it’s not important,just wondering…
thanks denis :keenly:

2 Replies
 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

Silencing errors doesn’t make them not happen. :shrug:

(@momo2012)
Joined: 11 months ago

Posts: 0

I see ,thanks lo

c’mmon what’s wrong? do you not want to see errors trace in the listener? close the listener.

are you looking for anything global that suppresses all error messages? there is no this one. but there is try/catch, a quiet option…

1 Reply
(@momo2012)
Joined: 11 months ago

Posts: 0

I want to hide error messages,it seems try() catch() is a best solution,today my script threw an “Unknown error”,maybe somewhere is wrong,I can’t find it out,but the major function works fine,so I decide to ignore this error part.whatever,I will use try function to do that,thanks again ,denis.

try/catch means something like – ye, ye … i know… but i’m too lazy to wrap it … it might not work but i don’t really care…

1 Reply
(@momo2012)
Joined: 11 months ago

Posts: 0

Yes

I just tried,and no luck,the Listener threw errors again,even add try catch from top to end like this:

try
(
...
all codes here...
...
)
catch()

– Error occurred during fileIn in #E:\bug.ms; line number: 26191
– Error occurred in anonymous codeblock; filename: E:\bug.ms; position: 1076365; line: 26191
>> MAXScript FileIn Exception:
– Unknown system exception <<

As you can see,there are too many lines ,it took me several hours,still don’t know where the issue is, :surprised

Unknown system exception cannot be hidden by try/catch. it’s serious. it’s tells that the system is not far to about a crash. you have to care about it and should not ignore it.

1 Reply
(@momo2012)
Joined: 11 months ago

Posts: 0

Alright. Got it.Thanks!