Skip to content

Commit 7958cff

Browse files
b-maorottier
authored andcommitted
fix: harmonize some error messages
1 parent 88ea931 commit 7958cff

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/node/audio_buffer_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl AudioBufferSourceNode {
257257
assert_valid_time_value(duration);
258258
assert!(
259259
!self.source_started,
260-
"InvalidStateError: Cannot call `start` twice"
260+
"InvalidStateError - Cannot call `start` twice"
261261
);
262262

263263
self.source_started = true;

src/node/delay.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ impl AudioNode for DelayNode {
131131
input: usize,
132132
) -> &'a dyn AudioNode {
133133
if self.context() != dest.context() {
134-
panic!("InvalidAccessError: Attempting to connect nodes from different contexts");
134+
panic!("InvalidAccessError - Attempting to connect nodes from different contexts");
135135
}
136136
if self.number_of_outputs() <= output {
137-
panic!("IndexSizeError: output port {} is out of bounds", output);
137+
panic!("IndexSizeError - output port {} is out of bounds", output);
138138
}
139139
if dest.number_of_inputs() <= input {
140-
panic!("IndexSizeError: input port {} is out of bounds", input);
140+
panic!("IndexSizeError - input port {} is out of bounds", input);
141141
}
142142

143143
self.context().connect(

src/node/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,13 @@ pub trait AudioNode {
268268
input: usize,
269269
) -> &'a dyn AudioNode {
270270
if self.context() != dest.context() {
271-
panic!("InvalidAccessError: Attempting to connect nodes from different contexts");
271+
panic!("InvalidAccessError - Attempting to connect nodes from different contexts");
272272
}
273273
if self.number_of_outputs() <= output {
274-
panic!("IndexSizeError: output port {} is out of bounds", output);
274+
panic!("IndexSizeError - output port {} is out of bounds", output);
275275
}
276276
if dest.number_of_inputs() <= input {
277-
panic!("IndexSizeError: input port {} is out of bounds", input);
277+
panic!("IndexSizeError - input port {} is out of bounds", input);
278278
}
279279

280280
self.context().connect(

0 commit comments

Comments
 (0)