Which means there is an error in the catch. Probably the get_attached_file().
Here is a new code that should be able to display the attached title in error:
public function get_attachment_body( $extractQuery, $post ) {
$solr_options = get_option( 'wdm_solr_conf_data' );
try {
// Set URL to attachment
$extractQuery->setFile( get_attached_file( $post->ID ) . "ccc" );
$doc1 = $extractQuery->createDocument();
$extractQuery->setDocument( $doc1 );
// We don't want to add the document to the solr index now
$extractQuery->addParam( 'extractOnly', 'true' );
// Try to extract the document body
$client = $this->client;
$result = $client->extract( $extractQuery );
$response = $result->getResponse()->getBody();
$body = preg_replace( '/^.*?\<body\>(.*?)\<\/body\>.*$/i', '\1', $response );
$body = str_replace( '\n', ' ', $body );
} catch ( Exception $e ) {
throw new Exception( 'Error on attached file "' . $post->post_title . '": <br/>' . $e->getMessage() );
}
return $body;
}