Empresa clean hause

Solo disponible en BuenasTareas
  • Páginas : 970 (242292 palabras )
  • Descarga(s) : 7
  • Publicado : 3 de agosto de 2010
Leer documento completo
Vista previa del texto

Copyright— 1998 by The Mandelbrot Set International, Ltd.

PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright — 1998 by The Mandelbrot Set (International) Limited All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission ofthe publisher. Library of Congress Cataloging-in-Publication Data Advanced Microsoft Visual Basic 6.0 / The Mandelbrot Set (International) Limited. -- 2nd ed. p. cm. Includes index. ISBN 1-57231-893-7 1. Microsoft Visual BASIC. 2. BASIC (Computer program language) I. Mandelbrot Set (International) Limited. II. Title: Advanced Microsoft Visual Basic 5. QA76.73.B3A345 1998 005.26'8--dc21 98-42530CIP Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 WCWC 3 2 1 0 9 8 Distributed in Canada by Penguin Books Canada Limited. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporationoffice or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at mspress.microsoft.com. Intel is a registered trademark of Intel Corporation. ROOS, VBA2000, and Visual DateScope 2000 are trademarks of The Mandelbrot Set (International) Limited. ActiveMovie, ActiveX, Developer Studio, DirectShow, JScript, Microsoft, Microsoft Press, Visual Basic, Visual C++,Visual FoxPro, Visual InterDev, Visual J++, Visual SourceSafe, Visual Studio, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. Acquisitions Editor: Stephen Guty Project Editor: Wendy Zucker TechnicalEditors: Marc Young, Jean Ross

PDF created with FinePrint pdfFactory trial version http://www.fineprint.com

-2Chapter 1 1. On Error GoTo Hell 1.1 A Methodical Approach to Error Handling PETER J. MORRIS Peet is the Technical Director and a cofounder of The Mandelbrot Set (International) Limited (TMS). Peet, a former Microsoft employee, is acknowledged industry-wide as a Microsoft Windows andVisual Basic expert and is a frequent speaker at events such as VBITS and TechEd. As a developer and lecturer, he has taught Windows (SDK) API, Advanced Windows API, Visual Basic (all levels), OS/2 Presentation Manager, C, C++, Advanced C and C++, Pascal, compiler theory, OWL, Smalltalk, and CommonView. Since the first edition of this book was released, this chapter has been tidied up a little. I'veadded some new rules and sidebars about handling errors in components and controls, as well as some examples of handling errors on a server. What is an error? The short answer is, "Something that's expensive to fix." Dealing with errors is costly in terms of both money and time. As you probably know already, your test cycle will be longer, more complex, and less effective if you don't buildappropriate error handling into your code right from the start. You should do all you can to reduce and handle errors in order to reduce costs, deliver quality code, and keep to schedules. One way to eradicate errors… a way that I'll dismiss immediately… is to write error-free code. I don't think it's possible to write such pristine code. A more realistic way to deal with errors effectively is to planfor them properly so that when they do occur: § The application doesn't crash. § The error's root cause (and thus cure) is relatively easy to determine. § The error is as acceptable and as invisible to the user as is humanly possible. So what must we do to put a good error handling scheme in place? It's a deceptively simple question with a big (subjective) set of answers. I think that acquiring...