Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public ExcpM(string Msg, StackFrame parCallStack = null, bool show = true)
  2. {
  3. StackFrame LcallStack;
  4. if (parCallStack == null)
  5. LcallStack= new StackFrame(1, true);
  6. else LcallStack= parCallStack;
  7.  
  8. //do stuff with info in LcallStack ..
  9. }
  10.  
  11. public ExcpM(string Msg, StackFrame parCallStack = null, bool show = true)
  12. {
  13. StackFrame LcallStack;
  14. if (parCallStack == null)
  15. LcallStack= new StackFrame(1, true);
  16. else LcallStack= parCallStack;
  17.  
  18. //do stuff with info in LcallStack ..
  19. }
  20.  
  21. public class ExcpFlsV:ExcpM
  22. {
  23. bool Rtrn { get { return false; } }
  24. public ExcpFlsV(string bsMsg, StackFrame bsCallStack = null)
  25. : base(bsMsg, bsCallStack)
  26. {
  27.  
  28. }
  29. }
  30.  
  31. public boolMethodReturn()
  32. {
  33. //unless adding Local callStack field to every method passes ctor of ExcpFlsV as calling method
  34. StackFrame LcallStack = new System.Diagnostics.StackFrame(1, true);
  35. if(some condition no met)
  36. return new ExcpFlsV("some error message...", LcallStack).Rtrn;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement