SQL Server 2019: Rasing errors between 1 and 13000
Try RAISERROR syntax below;
RAISERROR(
          'Test error' -- Error message
          ,0 -- Severity
          ,1 -- State
         ) WITH LOG;

For more information, you can check out the document.