¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

3-series out of bounds array references FYI...


Chip
 

Here's a lowdown on a great "feature" in case anyone trips across it before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element beyond what it's declared for, you get a zero result and (I believe) an error in the log. (A slap on the wrists, and obviously not the results you're expecting)

In the 3-series, however - the remainder of the code following the line the error is on is THROWN OUT like last week's rancid leftovers. You get an error in your log, sure - but anything that relied on the block of code completing ain't gonna get satisfied. (Y'know, like, turning off the semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip


 

I don't know why I'm asking this question, but I don't suppose SIMPL+ on the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider

-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...


Here's a lowdown on a great "feature" in case anyone trips across it before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element beyond what it's declared for, you get a zero result and (I believe) an error in the log. (A slap on the wrists, and obviously not the results you're expecting)

In the 3-series, however - the remainder of the code following the line the error is on is THROWN OUT like last week's rancid leftovers. You get an error in your log, sure - but anything that relied on the block of code completing ain't gonna get satisfied. (Y'know, like, turning off the semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip




------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links


 

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@...> wrote:

**


I don't know why I'm asking this question, but I don't suppose SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element
beyond what it's declared for, you get a zero result and (I believe) an
error in the log. (A slap on the wrists, and obviously not the results
you're expecting)

In the 3-series, however - the remainder of the code following the line
the error is on is THROWN OUT like last week's rancid leftovers. You get an
error in your log, sure - but anything that relied on the block of code
completing ain't gonna get satisfied. (Y'know, like, turning off the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the
Database area.
Yahoo!
Groups Links



[Non-text portions of this message have been removed]


Chip
 

Yeah - not in S+... In this case it's called:

IF (idx <= YOUR FREAKING ARRAY DECLARATION)
{
// Happily reference your array here
}
ELSE
{
// Lol. Fail.
}

- Chip

--- In Crestron@..., Lincoln King-Cliby <lincoln@...> wrote:

I don't know why I'm asking this question, but I don't suppose SIMPL+ on the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider

-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...


Here's a lowdown on a great "feature" in case anyone trips across it before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element beyond what it's declared for, you get a zero result and (I believe) an error in the log. (A slap on the wrists, and obviously not the results you're expecting)

In the 3-series, however - the remainder of the code following the line the error is on is THROWN OUT like last week's rancid leftovers. You get an error in your log, sure - but anything that relied on the block of code completing ain't gonna get satisfied. (Y'know, like, turning off the semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip




------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links


 

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working code. Exceptions can be caught and handled in the CATCH portion of the block. The exception can also be evaluated using either the GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@...> wrote:

**


I don't know why I'm asking this question, but I don't suppose SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element
beyond what it's declared for, you get a zero result and (I believe) an
error in the log. (A slap on the wrists, and obviously not the results
you're expecting)

In the 3-series, however - the remainder of the code following the line
the error is on is THROWN OUT like last week's rancid leftovers. You get an
error in your log, sure - but anything that relied on the block of code
completing ain't gonna get satisfied. (Y'know, like, turning off the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the
Database area.
Yahoo!
Groups Links





 

Ooh! Nifty :)

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@...> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working code. Exceptions can be caught and handled in the CATCH portion of the block. The exception can also be evaluated using either the GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@...> wrote:

**


I don't know why I'm asking this question, but I don't suppose SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element
beyond what it's declared for, you get a zero result and (I believe) an
error in the log. (A slap on the wrists, and obviously not the results
you're expecting)

In the 3-series, however - the remainder of the code following the line
the error is on is THROWN OUT like last week's rancid leftovers. You get an
error in your log, sure - but anything that relied on the block of code
completing ain't gonna get satisfied. (Y'know, like, turning off the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the
Database area.
Yahoo!
Groups Links



[Non-text portions of this message have been removed]


Heath Volmer
 

I wouldn't really expect the code in a try to continue after being caught - unless I misunderstand your meaning.

Good to know that's there. Thanks Rob.

Heath Volmer
Digital Domain Systems
Littleton, CO

Sent from my iTypo 4

On Aug 14, 2013, at 7:08 PM, "RobK" <fooguy89@...> wrote:

Not sure if it continues after the exception,


 

Exactly

Try
//Doing something that's likely to generate an error <-- gets executed
//Something that generates an error <-- gets executed up to the point of erroring out
//Something else <-- doesn't get executed
Catch
// Handle the something that generated an error only if it actually generated an error
End try

// Continue with execution flow..

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
ControlWorks Consulting, LLC
Crestron Services Provider

-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of Heath Volmer
Sent: Wednesday, August 14, 2013 7:27 PM
To: Crestron@...
Subject: Re: [Crestron] Re: 3-series out of bounds array references FYI...

I wouldn't really expect the code in a try to continue after being caught - unless I misunderstand your meaning.

Good to know that's there. Thanks Rob.

Heath Volmer
Digital Domain Systems
Littleton, CO

Sent from my iTypo 4

On Aug 14, 2013, at 7:08 PM, "RobK" <fooguy89@...> wrote:

Not sure if it continues after the exception,

------------------------------------



Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the Database area.
Yahoo! Groups Links


Chip
 

Yeah - wonder when they snuck that one in there!

- Chip

--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

Ooh! Nifty :)

Sent from my iPhone

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@...> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working code. Exceptions can be caught and handled in the CATCH portion of the block. The exception can also be evaluated using either the GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@> wrote:

**


I don't know why I'm asking this question, but I don't suppose SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has it?

Heck at least with VB in the old days you could at least On Error Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:
Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an element
beyond what it's declared for, you get a zero result and (I believe) an
error in the log. (A slap on the wrists, and obviously not the results
you're expecting)

In the 3-series, however - the remainder of the code following the line
the error is on is THROWN OUT like last week's rancid leftovers. You get an
error in your log, sure - but anything that relied on the block of code
completing ain't gonna get satisfied. (Y'know, like, turning off the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the 3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and drivers.

A contact list of Crestron dealers and programmers can be found in the
Database area.
Yahoo!
Groups Links





[Non-text portions of this message have been removed]


 

I was bit by this one.

Boy did it kill some time.

The code was littered with Print statements to verify execution from event
handler to function to function to my insanity...

It would be great if that error entry was sent back as a TRACE as well so
that you get a nice notice in your face. The 3-Series log is so verbose
that items get lost quite easily after a day of loading and testing.


On Wed, Aug 14, 2013 at 9:05 PM, Chip <cfm@...> wrote:

**



Yeah - wonder when they snuck that one in there!

- Chip


--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

Ooh! Nifty :)

Sent from my iPhone

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@...> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working
code. Exceptions can be caught and handled in the CATCH portion of the
block. The exception can also be evaluated using either the
GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have
it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@> wrote:

**


I don't know why I'm asking this question, but I don't suppose
SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has
it?

Heck at least with VB in the old days you could at least On Error
Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer
(Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:

Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...]
On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across
it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an
element
beyond what it's declared for, you get a zero result and (I
believe) an
error in the log. (A slap on the wrists, and obviously not the
results
you're expecting)

In the 3-series, however - the remainder of the code following the
line
the error is on is THROWN OUT like last week's rancid leftovers.
You get an
error in your log, sure - but anything that relied on the block of
code
completing ain't gonna get satisfied. (Y'know, like, turning off
the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the
3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and
drivers.

A contact list of Crestron dealers and programmers can be found in
the
Database area.
Yahoo!
Groups Links





[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]


Chip
 

Yeah - a program slot specific switch for ERR (Like, "ERR -P:3") would be nice to filter out the stuff you don't care about. I have to remember to put that one in through TBTS. :)

- Chip

--- In Crestron@..., crestronpro <crestronpro@...> wrote:

I was bit by this one.

Boy did it kill some time.

The code was littered with Print statements to verify execution from event
handler to function to function to my insanity...

It would be great if that error entry was sent back as a TRACE as well so
that you get a nice notice in your face. The 3-Series log is so verbose
that items get lost quite easily after a day of loading and testing.


On Wed, Aug 14, 2013 at 9:05 PM, Chip <cfm@...> wrote:

**



Yeah - wonder when they snuck that one in there!

- Chip


--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Ooh! Nifty :)

Sent from my iPhone

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working
code. Exceptions can be caught and handled in the CATCH portion of the
block. The exception can also be evaluated using either the
GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have
it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@> wrote:

**


I don't know why I'm asking this question, but I don't suppose
SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has
it?

Heck at least with VB in the old days you could at least On Error
Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer
(Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:

Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...]
On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across
it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an
element
beyond what it's declared for, you get a zero result and (I
believe) an
error in the log. (A slap on the wrists, and obviously not the
results
you're expecting)

In the 3-series, however - the remainder of the code following the
line
the error is on is THROWN OUT like last week's rancid leftovers.
You get an
error in your log, sure - but anything that relied on the block of
code
completing ain't gonna get satisfied. (Y'know, like, turning off
the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the
3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and
drivers.

A contact list of Crestron dealers and programmers can be found in
the
Database area.
Yahoo!
Groups Links





[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]


 

Many of the items that get logged were relegated to the SHOWEXTRA on the
2-Series.

There are switches to filter what you want to see back, but my fingers
never remember that when I am looking at the log. Time for some new muscle
memory.


On Fri, Aug 16, 2013 at 12:38 PM, Chip <cfm@...> wrote:

**



Yeah - a program slot specific switch for ERR (Like, "ERR -P:3") would be
nice to filter out the stuff you don't care about. I have to remember to
put that one in through TBTS. :)

- Chip


--- In Crestron@..., crestronpro <crestronpro@...> wrote:

I was bit by this one.

Boy did it kill some time.

The code was littered with Print statements to verify execution from
event
handler to function to function to my insanity...

It would be great if that error entry was sent back as a TRACE as well so
that you get a nice notice in your face. The 3-Series log is so verbose
that items get lost quite easily after a day of loading and testing.


On Wed, Aug 14, 2013 at 9:05 PM, Chip <cfm@...> wrote:

**



Yeah - wonder when they snuck that one in there!

- Chip


--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Ooh! Nifty :)

Sent from my iPhone

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working
code. Exceptions can be caught and handled in the CATCH portion of the
block. The exception can also be evaluated using either the
GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have
it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@> wrote:

**


I don't know why I'm asking this question, but I don't suppose
SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling
has
it?

Heck at least with VB in the old days you could at least On
Error
Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer
(Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:

Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:
Crestron@...]
On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references
FYI...

Here's a lowdown on a great "feature" in case anyone trips
across
it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an
element
beyond what it's declared for, you get a zero result and (I
believe) an
error in the log. (A slap on the wrists, and obviously not the
results
you're expecting)

In the 3-series, however - the remainder of the code following
the
line
the error is on is THROWN OUT like last week's rancid
leftovers.
You get an
error in your log, sure - but anything that relied on the
block of
code
completing ain't gonna get satisfied. (Y'know, like, turning
off
the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on
the
3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and
drivers.

A contact list of Crestron dealers and programmers can be
found in
the
Database area.
Yahoo!
Groups Links



[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]


 

Or, you could post it on labs so it stands a chance of reaching engineering.

The 3 series forum is pretty supportive, IMHO. I know there's a seperate "feature request" forum, that seldom gets responses. However, since it's an engineering driven board, I kind of don't expect responses to a feature request. What's to say... "Noted"...?

--- In Crestron@..., "Chip" <cfm@...> wrote:


Yeah - a program slot specific switch for ERR (Like, "ERR -P:3") would be nice to filter out the stuff you don't care about. I have to remember to put that one in through TBTS. :)

- Chip


--- In Crestron@..., crestronpro <crestronpro@> wrote:

I was bit by this one.

Boy did it kill some time.

The code was littered with Print statements to verify execution from event
handler to function to function to my insanity...

It would be great if that error entry was sent back as a TRACE as well so
that you get a nice notice in your face. The 3-Series log is so verbose
that items get lost quite easily after a day of loading and testing.


On Wed, Aug 14, 2013 at 9:05 PM, Chip <cfm@> wrote:

**



Yeah - wonder when they snuck that one in there!

- Chip


--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Ooh! Nifty :)

Sent from my iPhone

On 2013-08-14, at 5:08 PM, "RobK" <fooguy89@> wrote:

From the SIMPL+ help:

"TRY-CATCH blocks catch and handle exceptions generated by working
code. Exceptions can be caught and handled in the CATCH portion of the
block. The exception can also be evaluated using either the
GetExceptionMessage or GetExceptionCode function."

Not sure if it continues after the exception, however, it does have
it. 3 series only.

--- In Crestron@..., Neil Dorin <neildorin@> wrote:

Only if you use a S# library Linc ;)


On Wed, Aug 14, 2013 at 10:22 AM, Lincoln King-Cliby <
lincoln@> wrote:

**


I don't know why I'm asking this question, but I don't suppose
SIMPL+ on
the 3 series has gained Try/Catch/End Try style error handling has
it?

Heck at least with VB in the old days you could at least On Error
Resume
Next ;)

Why do I sound so bitter this week?

Lincoln

--
Lincoln King-Cliby, CTS
Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer
(Silver)
V: 440.449.1100 x1107 F: 440-449-1106 I:

Crestron Services Provider


-----Original Message-----
From: Crestron@... [mailto:Crestron@...]
On
Behalf Of Chip
Sent: Wednesday, August 14, 2013 12:19 PM
To: Crestron@...
Subject: [Crestron] 3-series out of bounds array references FYI...

Here's a lowdown on a great "feature" in case anyone trips across
it
before you spend too much time tearing your hair out.

In the 2-series, if you have an array and attempt to access an
element
beyond what it's declared for, you get a zero result and (I
believe) an
error in the log. (A slap on the wrists, and obviously not the
results
you're expecting)

In the 3-series, however - the remainder of the code following the
line
the error is on is THROWN OUT like last week's rancid leftovers.
You get an
error in your log, sure - but anything that relied on the block of
code
completing ain't gonna get satisfied. (Y'know, like, turning off
the
semaphore on a parsing routine)

So make sure you do range checking before accessing arrays on the
3s... :(

- Chip

------------------------------------





Check out the Files area for useful modules, documents, and
drivers.

A contact list of Crestron dealers and programmers can be found in
the
Database area.
Yahoo!
Groups Links





[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]