Just noticed while browsing the source that the Klout class allows construction with a null or blank key, but will then throw an KloutException when any of the methods are called. It also appears the only way to set the key is via the constructor, so you can't fix the problem after the instance is created.
Have I missed something? While it would be a breaking change at this point, would it not be better to throw an Argument or ArgumentNull exception from the constructor on an invalid key, rather than throwing a KloutException sometime later when it's all too late anyway?
Just noticed while browsing the source that the Klout class allows construction with a null or blank key, but will then throw an KloutException when any of the methods are called. It also appears the only way to set the key is via the constructor, so you can't fix the problem after the instance is created.
Have I missed something? While it would be a breaking change at this point, would it not be better to throw an Argument or ArgumentNull exception from the constructor on an invalid key, rather than throwing a KloutException sometime later when it's all too late anyway?