-- Stored Procedure: dbo.error_stub -- Bill Wunder use admin GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[error_stub]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[error_stub] GO CREATE proc error_stub @input int as declare @err varchar(1000), @errdesc varchar(1000) -- if a SQLLiteSpeed backup is already running on this db do nothing if @input = 1 begin set @Err = 'input is 1' goto ErrorHandler end select 'input is not 1' return ErrorHandler: set @ErrDesc = 'admin.dbo.error_stub failed %s' raiserror (@ErrDesc,16,1,@Err) --WITH LOG return -1 GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO