{"id":662,"date":"2011-07-30T00:49:33","date_gmt":"2011-07-30T08:49:33","guid":{"rendered":"http:\/\/www.andreanolanusse.com\/en\/?p=662"},"modified":"2012-09-25T11:26:57","modified_gmt":"2012-09-25T18:26:57","slug":"delphi-developer-certification-tips-3","status":"publish","type":"post","link":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/","title":{"rendered":"Delphi Developer Certification Tips #3"},"content":{"rendered":"<p>The tips #3 for the Delphi Developer Certification it&#8217;s about exception handling.<\/p>\n<p>Exceptions are exceptional conditions that require special handling; the exception handling provides a standard way of dealing with errors. Using exception handling you will be able to manage errors when it happen and decide what to do.<\/p>\n<p>The RAD Studio documentation has a specific topic about Exception Handling, take sometime and read this\u00a0<strong><a title=\"RAD Studio documentation - Exception Handling\" href=\"http:\/\/docwiki.embarcadero.com\/RADStudio\/en\/Exception_handling_Index\" target=\"_blank\">topic<\/a>,<\/strong>\u00a0it will help you to answer the exam questions related with exceptions.<\/p>\n<p>You may think because you use try..except..end, you know enough to answer the exam questions, I would say <strong>NO<\/strong>. Since we have a large pool of questions, the exam will ask you about different aspects of exception handling, like:\u00a0<a title=\"RAD Studio documentation - Reraising exceptions\" href=\"http:\/\/docwiki.embarcadero.com\/RADStudio\/en\/Reraising_Exceptions\" target=\"_blank\">Re-raising Exceptions<\/a>, <a title=\"RAD Studio documentation - Silent Exceptions\" href=\"http:\/\/docwiki.embarcadero.com\/RADStudio\/en\/Silent_Exceptions\" target=\"_blank\">Silent Exceptions<\/a> and more.<\/p>\n<p>Silent Exceptions is a way to raise a exception without showing the error message, while the regular exception show the error message, but is not only this.<\/p>\n<ul>\n<li>Silent exceptions all descend from the standard exception type\u00a0<em>EAbort<\/em>.<\/li>\n<li>Delphi has a procedure called Abort, which automatically call raise a EAbort exception<\/li>\n<\/ul>\n<div>When the topic is re-raising exceptions, RAD Studio documentation has a good introduction on that.<\/div>\n<div>\n<p>When the reserved word\u00a0<strong>raise<\/strong>\u00a0occurs in an exception block without an object reference following it, it raises whatever exception is handled by the block. This allows an exception handler to respond to an error in a limited way and then re-raise the exception. Re-raising is useful when a procedure or function has to clean up after an exception occurs but cannot fully handle the exception.<\/p>\n<p>For example, the\u00a0GetFileList\u00a0function allocates a\u00a0TStringList\u00a0object and fills it with file names matching a specified search path:<\/p>\n<\/div>\n<pre class=\"brush: delphi\">function GetFileList(const Path: string): TStringList;\r\nvar\r\n  I: Integer;\r\n  SearchRec: TSearchRec;\r\nbegin\r\n  Result := TStringList.Create;\r\n  try\r\n    try\r\n       I := FindFirst(Path, 0, SearchRec);\r\n       while I = 0 do\r\n       begin\r\n         Result.Add(SearchRec.Name);\r\n         I := FindNext(SearchRec);\r\n       end;\r\n     finally\r\n       FindClose(SearchRec);\r\n     end;\r\n  except\r\n    Result.Free;\r\n    raise;\r\n  end;\r\nend;<\/pre>\n<p>GetFileList creates a TStringList object, and then uses the FindFirst and FindNext functions to initialize it. If the initialization fails &#8211; for example because the search path is invalid, or because there is not enough memory to fill in the string list &#8211; GetFileList needs to dispose of the new string list, since the caller does not yet know of its existence. For this reason, initialization of the string list is performed in a try&#8230;except..statement. If an exception occurs, the statement&#8217;s exception block disposes of the string list, then re-raises the exception.<\/p>\n<p>The exam goes beyond of the two aspects mentioned here.\u00a0The following three links will help you to learn more about exception handling:<\/p>\n<ul>\n<li><a href=\"http:\/\/docwiki.embarcadero.com\/RADStudio\/en\/Exception_handling_Index\" target=\"_blank\">RAD Studio documentation &#8211; Exception Handling<\/a><\/li>\n<li><a href=\"http:\/\/www.delphibasics.co.uk\/Article.asp?Name=Exceptions\" target=\"_blank\">Delphi Basic &#8211; Exception handling in your code<\/a><\/li>\n<li><a href=\"http:\/\/www.delphibasics.co.uk\/RTL.asp?Name=Raise\" target=\"_blank\">Delphi Basic &#8211; Raise<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The tips #3 for the Delphi Developer Certification it&#8217;s about exception handling. Exceptions are exceptional conditions that require special handling; the exception handling provides a standard way of dealing with errors. Using exception handling you will be able to manage errors when it happen and decide what to do. The RAD Studio documentation has a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_s2mail":"yes","footnotes":""},"categories":[10],"tags":[70,90],"class_list":["post-662","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-certification","tag-delphi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development<\/title>\n<meta name=\"description\" content=\"The tips #3 for the Delphi Developer Certification it&#039;s about exception handling. Exceptions are exceptional conditions that require special handling; the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development\" \/>\n<meta property=\"og:description\" content=\"The tips #3 for the Delphi Developer Certification it&#039;s about exception handling. Exceptions are exceptional conditions that require special handling; the\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreano Lanusse | Technology and Software Development\" \/>\n<meta property=\"article:published_time\" content=\"2011-07-30T08:49:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-09-25T18:26:57+00:00\" \/>\n<meta name=\"author\" content=\"Andreano Lanusse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andreano Lanusse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\"},\"author\":{\"name\":\"Andreano Lanusse\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"headline\":\"Delphi Developer Certification Tips #3\",\"datePublished\":\"2011-07-30T08:49:33+00:00\",\"dateModified\":\"2012-09-25T18:26:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\"},\"wordCount\":416,\"commentCount\":13,\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"keywords\":[\"Certification\",\"Delphi\"],\"articleSection\":[\"Delphi\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\",\"url\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\",\"name\":\"Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\"},\"datePublished\":\"2011-07-30T08:49:33+00:00\",\"dateModified\":\"2012-09-25T18:26:57+00:00\",\"description\":\"The tips #3 for the Delphi Developer Certification it's about exception handling. Exceptions are exceptional conditions that require special handling; the\",\"breadcrumb\":{\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreanolanusse.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Delphi Developer Certification Tips #3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#website\",\"url\":\"https:\/\/www.andreanolanusse.com\/en\/\",\"name\":\"Andreano Lanusse | Technology and Software Development\",\"description\":\"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos\",\"publisher\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b\",\"name\":\"Andreano Lanusse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g\",\"caption\":\"Andreano Lanusse\"},\"logo\":{\"@id\":\"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/\"},\"description\":\"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.\",\"sameAs\":[\"http:\/\/www.andreanolanusse.com\",\"https:\/\/x.com\/andreanolanusse\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development","description":"The tips #3 for the Delphi Developer Certification it's about exception handling. Exceptions are exceptional conditions that require special handling; the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/","og_locale":"en_US","og_type":"article","og_title":"Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development","og_description":"The tips #3 for the Delphi Developer Certification it's about exception handling. Exceptions are exceptional conditions that require special handling; the","og_url":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/","og_site_name":"Andreano Lanusse | Technology and Software Development","article_published_time":"2011-07-30T08:49:33+00:00","article_modified_time":"2012-09-25T18:26:57+00:00","author":"Andreano Lanusse","twitter_misc":{"Written by":"Andreano Lanusse","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#article","isPartOf":{"@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/"},"author":{"name":"Andreano Lanusse","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"headline":"Delphi Developer Certification Tips #3","datePublished":"2011-07-30T08:49:33+00:00","dateModified":"2012-09-25T18:26:57+00:00","mainEntityOfPage":{"@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/"},"wordCount":416,"commentCount":13,"publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"keywords":["Certification","Delphi"],"articleSection":["Delphi"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/","url":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/","name":"Delphi Developer Certification Tips #3 | Andreano Lanusse | Technology and Software Development","isPartOf":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#website"},"datePublished":"2011-07-30T08:49:33+00:00","dateModified":"2012-09-25T18:26:57+00:00","description":"The tips #3 for the Delphi Developer Certification it's about exception handling. Exceptions are exceptional conditions that require special handling; the","breadcrumb":{"@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.andreanolanusse.com\/en\/delphi-developer-certification-tips-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreanolanusse.com\/en\/"},{"@type":"ListItem","position":2,"name":"Delphi Developer Certification Tips #3"}]},{"@type":"WebSite","@id":"https:\/\/www.andreanolanusse.com\/en\/#website","url":"https:\/\/www.andreanolanusse.com\/en\/","name":"Andreano Lanusse | Technology and Software Development","description":"Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos","publisher":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreanolanusse.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/b51fdf99c01fcd6ae0a5ae894c23837b","name":"Andreano Lanusse","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/49ab23ef70c249c0cb3469f14ef07edc?s=96&d=mm&r=g","caption":"Andreano Lanusse"},"logo":{"@id":"https:\/\/www.andreanolanusse.com\/en\/#\/schema\/person\/image\/"},"description":"Andreano Lanusse is an expert and enthusiastic on software development industry, at Embarcadero he is focused on helping to make sure the products being developed meet the expectations of Embarcadero's customers, as well as defining market strategies for Latin America. Today as Latin Lead Evangelist he spends great deal of time in developer conferences, tradeshows, user group, and visiting customers throughout Latin America. Before Embarcadero, he worked 13 years for Borland, Andreano has worked as Support Coordinator, Engineer, Product Manager, including Product Line Sales Manager, where was responsible to manage the relationship with Brazil developer community, also has worked as Principal Consultant for Borland Consulting Services on the development and management of critical applications. He previously served as Chief Architect for USS Solu\u00e7\u00f5es Gerenciadas (now USS Tempo). Andreano holds a bachelor's degree in Business Administration Marketing Emphasis from Sumare Institute, MBA in Project Management from FGV, certification in Microsoft products, all Borland ALM products, and all CodeGear product line.","sameAs":["http:\/\/www.andreanolanusse.com","https:\/\/x.com\/andreanolanusse"]}]}},"_links":{"self":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/comments?post=662"}],"version-history":[{"count":0,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/posts\/662\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/media?parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/categories?post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.andreanolanusse.com\/en\/wp-json\/wp\/v2\/tags?post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}