Raise an exception.
ex.
raise ValueError('Password incorrect')
hey jdh, thx for the answer.
I try it with the ASSERT statement.
And it works!!
FME_BEGIN_PYTHON script returned error on execution.
_____________________________________
import fme
pw = fme.macroValuess'passwort']
assert pw == "test", "PASSWORT FALSCH"
____________________________________
hey jdh, thx for the answer.
I try it with the ASSERT statement.
And it works!!
FME_BEGIN_PYTHON script returned error on execution.
_____________________________________
import fme
pw = fme.macroValuess'passwort']
assert pw == "test", "PASSWORT FALSCH"
____________________________________
Assertions are generally used for testing/debugging purposes, but essentially it's a shortcut for
if not (x): raise AssertionError (y)
The example I have is
import os
if os.path.exists(outputFilename):
raiseException("The output file already exists - choose a different destination filename.)
See this article for more info
The example I have is
import os
if os.path.exists(outputFilename):
raiseException("The output file already exists - choose a different destination filename.)
See this article for more info
There needs to be an space between 'raise' and 'Exception' as in:
raise Exception("This is an exception")