spnIsError: Check for spectrino error in a function result

Description Usage Arguments Value Author(s) Examples

Description

Checking if the result of spectrino function is error. In your code, it's a good practice to check the result from any spectrino function (except for spnNew, spnFree and spnCheck). From command line there is no sense to call this function because you would see the error message on the terminal.

Usage

1
spnIsError(rslt)

Arguments

rslt

check if rslt is character and if it is, if it is an error message (starts with Error:)

Value

spnIsError returns logical for spectrino error.

Author(s)

Teodor Krastev

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
spnNew() 

# generate test set
spnOpenTree("<test>")

# all the specs from all the groups (excluding "unknowns" group, if any)
m1 <- spnGetTree(FALSE) 

# is there an error 
spnIsError(m1)

# Release of Spectrino
#spnFree(TRUE)

spectrino documentation built on June 4, 2019, 1:02 a.m.