Nasty bug discovered by @RiaanKnoetze where it would get a variation
without parent, and due to the return, it wouldn’t be ‘seen’ as a
variation, therefore creating fatal errors when props are called.
To prevent this, lets allow product constructors to throw exceptions.
If they do, the factory class will catch them and return false instead
of an invalid product object.
@claudiosmweb Thoughts on this one before merge?
HHVM is a bit weird and will throw these warnings otherwise:
HipHop Warning: Cannot access property on non-object in /home/_____/public_html/wp-content/plugins/woocommerce/classes/class-wc-product-factory.php on line 36
HipHop Warning: Cannot access property on non-object in /home/_____/public_html/wp-content/plugins/woocommerce/classes/class-wc-product-factory.php on line 37