summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2015-09-29 20:38:53 +0300
committerJyri Sarha <jsarha@ti.com>2015-09-30 14:36:48 +0300
commit1f6b4591b4697a3acf228e694c490cc5f75ae4e4 (patch)
treeb73002bf6a180995b24fda719ae497383c1f866c
parentcd38c4598c55060be1425cad429b23a3f1a6574c (diff)
Add rest of missing Card exceptions.
-rw-r--r--libkms++/card.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 626c424..7aa8bdb 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -136,7 +136,7 @@ Property* Card::get_prop(const char *name) const
return prop;
}
- throw invalid_argument("foo");
+ throw invalid_argument(string("Card property ") + name + " not found");
}
Connector* Card::get_first_connected_connector() const
@@ -193,7 +193,7 @@ Crtc* Card::get_crtc_by_index(uint32_t idx) const
if (crtc && crtc->idx() == idx)
return crtc;
}
- throw invalid_argument("fob");
+ throw invalid_argument(string("Crtc #") + to_string(idx) + "not found");
}
Crtc* Card::get_crtc(uint32_t id) const { return dynamic_cast<Crtc*>(get_object(id)); }
@@ -221,7 +221,9 @@ std::vector<kms::Pipeline> Card::get_connected_pipelines()
}
if (!crtc)
- throw invalid_argument("fob");
+ throw invalid_argument(string("Connector #") +
+ to_string(conn->idx()) +
+ " has no possible crtcs");
outputs.push_back(Pipeline { crtc, conn });
}