Do

Merge lp:~jassmith/do/thirdsearchcontrollerfix into lp:do

Proposed by Jason Smith
Status: Merged
Approved by: Jason Smith
Approved revision: 1255
Merged at revision: not available
Proposed branch: lp:~jassmith/do/thirdsearchcontrollerfix
Merge into: lp:do
Diff against target: None lines
To merge this branch: bzr merge lp:~jassmith/do/thirdsearchcontrollerfix
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Robert Dyer (community) Approve
Review via email: mp+7864@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Forgot to use a .Safe causing an exception in usage

Revision history for this message
Robert Dyer (psybers) :
review: Approve
Revision history for this message
Jason Smith (jassmith) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Do/src/Do.Core/ThirdSearchController.cs'
--- Do/src/Do.Core/ThirdSearchController.cs 2009-06-20 04:14:38 +0000
+++ Do/src/Do.Core/ThirdSearchController.cs 2009-06-24 21:19:28 +0000
@@ -63,10 +63,10 @@
63 63
64 if (first.IsAction () && first.AsAction ().Safe.SupportsItem (second))64 if (first.IsAction () && first.AsAction ().Safe.SupportsItem (second))
65 return first.AsAction ();65 return first.AsAction ();
66 else if (second.IsAction () && second.AsAction ().SupportsItem (first))66 else if (second.IsAction () && second.AsAction ().Safe.SupportsItem (first))
67 return second.AsAction ();67 return second.AsAction ();
68 // fixme68 // fixme
69 throw new Exception ("Something strange happened");69 throw new Exception ("Could not get contextual action");
70 }70 }
71 71
72 Item GetContextualItem ()72 Item GetContextualItem ()
@@ -81,10 +81,10 @@
81 81
82 if (first.IsAction () && first.AsAction ().Safe.SupportsItem (second))82 if (first.IsAction () && first.AsAction ().Safe.SupportsItem (second))
83 return second;83 return second;
84 else if (second.IsAction () && second.AsAction ().SupportsItem (first))84 else if (second.IsAction () && second.AsAction ().Safe.SupportsItem (first))
85 return first;85 return first;
86 // fixme86 // fixme
87 throw new Exception ("Something strange happened");87 throw new Exception ("Could not get contextual item");
88 }88 }
89 89
90 public ThirdSearchController(ISearchController FirstController, ISearchController SecondController) : base ()90 public ThirdSearchController(ISearchController FirstController, ISearchController SecondController) : base ()