<｜begin▁of▁sentence｜>### Instruction:
Given a chordal graph whose edge set is [(1, 2), (1, 3), (2, 3), (2, 4), (3, 4), (3, 5), (3, 6), (4, 5), (4, 6), (5, 6), (7, 8)], compute its treewidth using NetworkX. Make sure to handle the case where the graph is found to be non-chordal and raise an appropriate error.
### Response:
import networkx as nx

# Create a chordal graph G
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 3), (2, 4), (3, 4), (3, 5), (3, 6), (4, 5), (4, 6), (5, 6), (7, 8)])
G.add_node(9)

# Compute the treewidth of the chordal graph
try:
    treewidth = nx.chordal_graph_treewidth(G)
    print('The treewidth of the graph is:', treewidth)
except nx.NetworkXError as e:
    print('Error:', e)
<|EOT|>
