|
| |
|
|
| |
Looking ahead to Synergy/DE 9
Structured exception handling
Synergy/DE 9 is scheduled for release in Spring 2007. It will deliver a new compiler that supports Synergy objects and includes typical OO features, such as inheritance and encapsulation. Synergy/DE 9 will also include enhancements to Synergy Language, UI Toolkit, and Workbench that will enable you to strengthen existing applications and improve your productivity. This article highlights one of the many new features in version 9, structured exception handling.
Error handling is a big part of any business application and makes up a large part of the logic flow of a program. In the simplest terms, whenever an error is encountered, an exception is thrown, which causes the stack to unwind until an exception handler that handles that type of thrown exception is found.
The main syntax elements of structured exception handling are the THROW statement and the TRY-CATCH-FINALLY statement. The purpose of the TRY-CATCH-FINALLY statement is to handle any thrown exceptions within the context of a TRY block. An exception can be thrown either implicitly by the Synergy Runtime when an error is encountered or explicitly by the application with the THROW statement.
try
begin
throw new MyException(“some error message”)
end
catch (e1, @SomeException)
begin
end
catch (e2, @MyException)
begin
open(2,o,”tt:”)
writes(2,e.Message)
close(2)
end
finally
begin
end
endtry
The TRY block contains all of the statements that are subject to the exception handler. The TRY statement can have one or more CATCH statements, each handling a different type of exception. When a thrown exception is being processed, the system scans the list of CATCH blocks looking for an exception type that is equal to or in the hierarchy of the thrown exception. The first CATCH statement that meets that condition is then executed. If no CATCH handlers in the current frame handle this type of thrown exception, the stack continues to unwind either until one is found or until an unhandled exception is reported. Any code that must be run regardless of whether or not an exception is handled can be placed in the FINALLY block. Typically the FINALLY block is used to release critical resources, such as file locks.
One advantage of structured exception handling is that you don’t need to write as much error handling code to control program logic flow after an error. As previously mentioned, the THROW statement unwinds the stack automatically until a handler that handles the type of exception thrown is found. Thus, an error can happen deep within a series of routine calls and yet still be handled at a higher level by a single exception handler.
Exceptions are also extensible. You can create your own exception with its own unique error message by simply creating a new class and extending the System.ApplicationException class. This exception can then be thrown and handled just like any other exception.
Since structured exception handling works with existing error handling, all of the existing system errors map to exceptions and therefore can be handled by exception handlers written for your application. Errors generated by the runtime that are not caught by an exception handler are reported in the traditional error and traceback. Consult your Synergy Language Reference Manual for more detailed information about this powerful new feature.
For more information about Synergy/DE 9, see our Web site.
Synergy/DE 9 is available for beta testing. If you are interested in participating, let us know.
top |
|
| |
|
| |
|
|
| |
| |
Will you need to support Windows Vista? |
|
| |
If so, plan your upgrade to Synergy/DE 9
Are your customers or prospects asking for Windows Vista support (or will they be soon)?
Microsoft recently released Windows Vista to corporate customers. Synergy/DE 9 will be the minimum Synergy/DE version that supports Vista. If you anticipate needing to support Vista, we encourage you to sign up for the Synergy/DE 9 beta test to verify that your 8.3 application runs unchanged on version 9 and that you can compile and run it with v9. You will then be in a position to support Vista should the need arise.
For more information about becoming a beta tester, contact us.
top |
|
| |
|
| |
| |
| |
| |
| |
| |
|
| |
| |
| Where in the World is Synergy/DE? |
Helping high school students across the United States show their school spirit
Have you ever paused to wonder where your high school student’s varsity jacket actually came from? Chances are Synergy/DE is working behind the scenes to make production of that jacket possible.
Rennoc Corporation, founded in 1954 by Richard Conner and producer of high quality, traditional wool and leather varsity jackets, pairs Synergy Language with Synergy/DE xfODBC to control and manage virtually every aspect of its varsity jacket production company.
All of that is quite a large job, given that Rennoc has over 6,000 teamwear and advertising specialty accounts and maintains an expansive inventory to meet the demands of its customer base.
Rich Wilson, IT manager for Rennoc Corporation, lists the myriad tasks that its Synergy applications perform: “The Synergy applications at Rennoc Corporation encompass shop floor control, piecework payroll, finished goods inventory control, order entry, accounts payable, accounts receivable, general ledger, raw material receipt and usage, bill of material, sales forecasting, and production planning.”
“A new warm-up suit introduced this year is stocked in men’s, women’s, and youth sizes in eleven color combinations,” explains Wilson. “The stock commitment on this warm-up suit alone accounts for nearly 300 SKUs.”
In addition, Rennoc is able to automatically fax and e-mail invoices and order acknowledgements, collect sewing information from the automated garment mover equipment, generate ad-hoc spreadsheets, and much more.
When asked why Rennoc uses Synergy/DE, Wilson’s answer was simple: “Reaching customer goals demands superiority from everyone…on every level. Rennoc is founded on this belief.” And Synergy/DE fits into that model perfectly.
Find out how Synergy/DE is powering applications in companies of all sizes across the globe.
top |
| |
| |
| |
NEW! Synergy-e-Quiz challenge |
|
| |
Test your Synergy/DE and trivia knowledge, and get a chance to win a $100 American Express gift check.
The contest will continue through the end of January, with new questions, as well as the answers to the previous questions, appearing in upcoming Synergy-e-News editions. Ready to be challenged? Play now.
top |
|
| |
|
|
| |
| Curious about the answers to the last quiz? |
Thanks to everyone who answered the first round of Synergy-e-Quiz questions! Find out which answers were correct, and why. |
| |
1. What does the following command do (UNIX/Windows):
dblink -l EXE:mylib.elb WND:tklib.elb
a. Creates EXE:mylib.dbr, linked to EXE:mylib.elb and EXE:tklib.elb at run time
b. Creates EXE:mylib.elb, linked to WND:tklib.elb at run time
c. Creates EXE:mylib.elb, including all the referenced routines in WND:tklib.elb at link time
d. Lists the routines in EXE:mylib.elb and WND:tklib.elb to stdout
Explanation:
dblink -l creates the ELB named in the next parameter. What follows are objects and libraries to include in the ELB. However, if one of these parameters is itself an ELB, then dblink creates a runtime-bound link to that ELB. So whenever EXE:mylib.elb is loaded, WND:tklib.elb will also be loaded automatically (if it wasn't already loaded). Note that in this example, EXE:mylib.elb is created empty because we specified no other object files or libraries.
2. What will be the result of the following statement, where hndl is a memory handle whose memory contains the string "< name >Jack & Jill's Place< /name >"?
result = %syn_escape_handle(hndl, XML_RULES, len)
a. "<name>Jack & Jill's Place</name>"
b. "<name>Jack & Jill's Place</name>"
c. result is returned 0, and the contents of hndl are returned "<name%gt;Jack & Jill's Place&;/name>"
d. result is returned 40, and the contents of hndl are returned "<name>Jack & Jill's Place</name>"
Explanation:
The result of %syn_escape_handle is 0 if no error occurred, and the resulting escaped string is returned in the memory allocated to the handle. That eliminates choices a and b. The second argument, XML_RULES, instructs %syn_escape_handle to use XML escape rules to replace the characters <, >, &, ", and ' with "<", ">", "&", """, and "'", respectively. Choice c does that, while d fails to translate the < and > characters.
3. If you have geniophobia, it means that you suffer from a fear of chins.
top |
| |
| |
| |
Platform News |
|
| |
Microsoft
Microsoft turns up the heat on windows 2000 users
December 15, 2006
Vista to benefit partners more than Microsoft
December 11, 2006
Deconstructing .NET 3.0: Windows Presentation Foundation
December 8, 2006
Microsoft readies Windows, Visual Studio security fixes
December 7, 2006
Vista security still no match for social engineering
December 5, 2006
Vista launch more whimper than bang for businesses
December 4, 2006
OpenVMS
Oracle Database 10.2.0.2 released for OpenVMS Alpha
December 6, 2006
Linux
Lightweight Linux for high-performance computing
December 4, 2006
Novell ships openSUSE 10.2
December 11, 2006
AMD
AMD describes road to 45-nm processors
December 12, 2006
top |
|
| |
|
|
| |
| |
Synergex Holiday Reminder |
|
| |
Synergex will be closed on Monday, December 25, and Monday, January 1, in observance of the Christmas and New Year holidays. If you anticipate needing our assistance on these days, please let us know.
top |
|
| |
|
|
| |
| |
Subscribe
to Synergy-e-News.
To view past issues of Synergy-e-News, see the Synergy-e-News
Archive.
To remove yourself from the Synergy-e-News mailing list, please
click here.
Trademarks:
Synergex, Synergy, Synergy Development Environment, Synergy/DE,
and all other Synergy/DE product names are trademarks of Synergex.
All other product and company names in this newsletter are
trademarks of their respective holders.
Synergex
International · 2330 Gold Meadow Way · Gold
River, CA 95670
+1 916.635.7300 | 800.366.3472 (North America) | 0800.898.368
(United Kingdom)
Copyright © 2006 Synergex International Corporation.
All rights reserved.
Synergy-e-News
12212006 |
|
|