OSDN Git Service

docs/devel: update error handling guidance for HMP commands
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 28 Oct 2021 15:13:55 +0000 (16:13 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 2 Nov 2021 15:55:13 +0000 (15:55 +0000)
commit6fa6b54f5b931e10e24f773d991a48da4f79e61a
treecb73a05e910d18e71486467401e27f0be64a542d
parentfa2613afa1ebe50c59606f1c30ad6738fe6919a5
docs/devel: update error handling guidance for HMP commands

Best practice is to use the 'hmp_handle_error' function, not
'monitor_printf' or 'error_report_err'. This ensures that the
message always gets an 'Error: ' prefix, distinguishing it
from normal command output.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
docs/devel/writing-monitor-commands.rst