
{"id":1320,"date":"2013-07-02T16:11:14","date_gmt":"2013-07-02T20:11:14","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=1320"},"modified":"2013-07-02T16:11:14","modified_gmt":"2013-07-02T20:11:14","slug":"friendly-error-messages","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=1320","title":{"rendered":"Friendly Error Messages"},"content":{"rendered":"<p>I just accidently gave .EXE extension to a file that was actually a .ZIP archive and tried to run it on Windows 7. What error do I get? Lo and behold:<\/p>\n<p><font color=\"red\"><i>The version of this file is not compatible with the version of Windows you&#8217;re running. Check your computer&#8217;s system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.<\/i><\/font><\/p>\n<p>Needless to say, this &#8220;program&#8221; won&#8217;t run on 32-bit, 64-bit or even 56-bit Windows. Because it is not a program at all, it&#8217;s a ZIP archive. The error message sent me searching in a completely wrong direction.<\/p>\n<p>I would rather have the message honestly tell me what happened (invalid executable format), and only then elaborate on a list of typical reasons for this debacle. I wonder what is the error message in Windows 8.1 (note to self: download it from MSDN).<\/p>\n<p>This reminds me of the days when ERROR_NOT_SUPPORTED came out with the text like &#8220;This call is not implemented on Windows 95, it only works on Windows NT&#8221;, which looked especially funny when you were running NT.<br \/>\n<a style=\"display:none\" href=\"http:\/\/www.codeproject.com\/script\/Articles\/BlogFeedList.aspx?amid=1181663\" rel=\"tag\">CodeProject<\/a><\/p>\n<p><b>PS<\/b>. It is even funnier on 32-bit windows. Check it out, it interprets misnamed EXE as a COM file and actually starts to execute it! If it is less than 64K in size of course. Otherwise you get &#8220;program too big to fit in memory&#8221; error, but only when running it from <code>cmd.exe<\/code>. Things we do for backward compatibility&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just accidently gave .EXE extension to a file that was actually a .ZIP archive and tried to run it on Windows 7. What error do I get? Lo and <a href=\"https:\/\/ikriv.com\/blog\/?p=1320\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[4,2,5],"tags":[],"class_list":["entry","author-ikriv","post-1320","post","type-post","status-publish","format-standard","category-hack","category-misc","category-dev"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1320"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1320\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}