This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var crucialData = new CrucialData(); // define an object however you do in your language | |
| LogglyLogLoggerServiceGlobalSingletonInstance.log_remotely({crucialData: crucialData}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Index() | |
| { | |
| int myNumber1 = 0; | |
| int myNumber2 = 1; | |
| try | |
| { | |
| int result = DivideNumbers(3, 4); | |
| } catch (Exception e) | |
| { | |
| // do something |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Index() | |
| { | |
| try | |
| { | |
| // all of your code here | |
| } catch (Exception e) | |
| { | |
| // do something | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int myNumber = DivideNumbers(1, 0); | |
| private int DivideNumbers(x, y) | |
| { | |
| return x/y; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try | |
| { | |
| int x = 1/0; | |
| } | |
| catch(DivideByZeroException e ) | |
| { | |
| EventLog.WriteEntry(sourceApplication, eventName, EventLogEntryType.Warning); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string sourceApplication = “My App”; | |
| string logName = “Application”; | |
| string eventName = “Login Error”; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try | |
| { | |
| int x = 1/0; | |
| } | |
| catch(DivideByZeroException e ) | |
| { | |
| // What you want to do when the error is thrown | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try | |
| { | |
| int x = 1/0; | |
| } | |
| catch(DivideByZeroException e ) | |
| { | |
| // What you want to do when the error is thrown | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try | |
| { | |
| // Your code that might throw an error | |
| } | |
| catch( ExceptionName e ) | |
| { | |
| // What you want to do when the error is thrown | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try | |
| { | |
| // Your code that might throw an error | |
| } | |
| catch( ExceptionName e ) | |
| { | |
| // What you want to do when the error is thrown | |
| } | |
NewerOlder