Skip to content

Commit

Permalink
JWN_SetWaveInWaveNote: Add an assertion that noteWave exists
Browse files Browse the repository at this point in the history
We would fail later on due to the IsNumericWave/IsTextWave checks anyway
but the error message is better.
  • Loading branch information
t-b committed Jan 23, 2024
1 parent 065b975 commit cafc1ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Packages/MIES/MIES_JSONWaveNotes.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ threadsafe Function JWN_SetWaveInWaveNote(WAVE wv, string jsonPath, WAVE noteWav
variable jsonID

ASSERT_TS(WaveExists(wv), "Missing wave")
ASSERT_TS(WaveExists(noteWave), "Missing noteWave")

ASSERT_TS(!IsEmpty(jsonPath), "Empty jsonPath")
ASSERT_TS(IsNumericWave(noteWave) || IsTextWave(noteWave), "Only numeric and text waves are supported as JSON wave note entry.")

Expand Down

0 comments on commit cafc1ff

Please sign in to comment.