LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_err_method.bas
blob9732a25e6faf15f9795c1d56ac75de54f9855a7d
1 ' This file is part of the LibreOffice project.
3 ' This Source Code Form is subject to the terms of the Mozilla Public
4 ' License, v. 2.0. If a copy of the MPL was not distributed with this
5 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 Option Explicit
10 Function doUnitTest as String
11 ' ERR
12 On Error GoTo ErrorHandler ' Set up error handler
13 Dim nVar As Integer
14 nVar = 0
15 nVar = 1/nVar
16 doUnitTest = "FAIL"
17 Exit Function
18 ErrorHandler:
19 If ( Err <> 11 ) Then
20 doUnitTest = "FAIL"
21 Else
22 doUnitTest = "OK"
23 Endif
24 End Function