Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 00003 00004 int main() 00005 { 00006 Serial console(USBTX, USBRX); 00007 00008 try 00009 { 00010 int z = 0; 00011 int x = ( 1 / z ); 00012 console.printf("%d", x); // Should never get here. 00013 return true; 00014 } 00015 catch(...) 00016 { 00017 // x and z are cleaned up at this point. 00018 // console was defined outside of the try. 00019 // This is a good place to place a breakpoint if you are debugging or running emulation. 00020 console.printf("Something went wrong! Terminating immediately.\n"); 00021 } 00022 00023 return false; 00024 }
Generated on Tue Jul 26 2022 09:55:34 by
1.7.2