protected function getObjectString($object)/*# : string */
    {
        // exception found
        if ($object instanceof \Exception) {
            return 'EXCEPTION: ' . $object->getMessage();

        // toString() found
        } elseif (method_exists($object, '__toString')) {
            return (string) $object;

        // other type object
        } else {
            return 'OBJECT: ' . get_class($object);
        }
    }