Created
April 21, 2014 17:18
-
-
Save mgroves/11149339 to your computer and use it in GitHub Desktop.
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 MyAction() | |
| { | |
| var listResults = _service.GetAllResults(); // an exception here gets logged, but execution continues | |
| var model = new MyViewModel(); | |
| model.NumResults = listResults.Count; // listResults is null, NullReferenceExcpetion here | |
| return View(model); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment