File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
server/lib/puppet-languageserver Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export class PuppetNodeGraphContentProvider implements vscode.TextDocumentConten
7979 graphContent = `<textarea id="graphviz_data" style="display:none">\n` + graphContent + `\n</textarea>` ;
8080 }
8181
82- var errorContent = `<div>${ compileResult . error } </div>`
82+ var errorContent = `<div style='font-size: 1.5em' >${ compileResult . error } </div>`
8383 if ( compileResult . error == null ) { errorContent = '' ; }
8484 if ( reporter ) {
8585 reporter . sendTelemetryEvent ( messages . PuppetCommandStrings . PuppetNodeGraphToTheSideCommandId ) ;
Original file line number Diff line number Diff line change @@ -83,7 +83,12 @@ def receive_request(request)
8383 'fontsize' => '""' ,
8484 'name' => 'vscode'
8585 }
86- dot_content = PuppetLanguageServer ::PuppetParserHelper . compile_to_pretty_relationship_graph ( content ) . to_dot ( options )
86+ node_graph = PuppetLanguageServer ::PuppetParserHelper . compile_to_pretty_relationship_graph ( content )
87+ if node_graph . vertices . count . zero?
88+ error_content = "There were no resources created in the node graph. Is there an include statement missing?"
89+ else
90+ dot_content = node_graph . to_dot ( options )
91+ end
8792 rescue => exception
8893 error_content = "Error while parsing the file. #{ exception } "
8994 end
You can’t perform that action at this time.
0 commit comments