<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60595>60595</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir][python] Include diagnostic messages in exceptions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
mlir:python
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
rkayaith
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rkayaith
</td>
</tr>
</table>
<pre>
Currently diagnostics from parsing, running pipelines, op verification etc. end up on stderr. These can instead be captured using the diagnostic engine bindings, and included in the python exception message. See this (and similar) TODOs: https://github.com/llvm/llvm-project/blob/985f7ff6326e91b0d508aa1b405f4f26ed683ca6/mlir/lib/Bindings/Python/IRCore.cpp#L2592-L2593
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkFvnTwQ_DXmsgqCBRM4cEjeE1KkT8qnNn_A2AtsawyyTdT37yvTlzTXXmC90uzs7IwKgWdH1Av5LBD9T3VTHBeBKOQ1U0dcNt9_dLNxM7f-cnhPLtobGFaz20JkHWDy2wq78oHdLPAC_nCO3Qw772TZUUjNbYd38jyxVpE3BxR1DuQMHDtsDkI05H0ObwsFAq0csAuRlIExPfd4eDJwJAqIC33hB3IzO4KRnWE3n2TKGWCn7WEoFSdiv8Ul8f7StJ8brBSCmimH70QQFw4gsE3IwCtb5QV28PZ6fQ2ieoIlxj0VAgeBw8xxOcZcb6vAwdr3j9_D7rcfpKPAYbTbKHDoWjk9TlNTYUNdORZGFq1S5VgXcqonbMg0baVVI3BYLfs0hxPu-VPN8P-5uMDh5dtl85TrfRdY_Yeyw4f0rTLTV6arOpVRXzaPsi3Lqqizpe-MluVYU4elNHqcdNNMDRaGCjWauikz7rHAqsDiEauixTovp7arJl1qmrqmMijqglbFNk_q8s3PGYdwUN8UspOZVSPZcM8PuUU5TSu5mCKEF4F4Sqqe9ruCM1i-Py81HnMQdWE5xPB3euRoz0CeSHkV8vkOlld4-ePoV-_vHoZk8qezITu87f_ZsVNZOvgp7ncAAAD__yIpB8A">