You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MATLAB] arrow.internal.proxy.validate throws an MATLAB:UndefinedFunction when crafting the message to display when throwing the arrow:proxy:ProxyNameMismatch error
#37245
Closed
sgilmore10 opened this issue
Aug 18, 2023
· 0 comments
· Fixed by #37248
Describe the bug, including details regarding any error messages, version, and platform.
When constructing the message to display with the arrow:proxy:ProxyNameMismatch error, we refer to an undefined variable in arrow.internal.proxy.validate(). This causes the function to thrown a MATLAB:UndefinedFunction error instead of the intended one.
Here's an example of this bug:
>> a=arrow.array([123]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Unrecognizedfunction or variable 'proxyName'.Errorin arrow.internal.proxy.validate (line 26)
msg ="Proxy class name is "+proxyName+", but expected "+expectedProxyName;
This was the expected error message:
>> a=arrow.array([123]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Errorusing arrow.internal.proxy.validateProxyclass name is arrow.array.proxy.Float64Array, but expected WrongProxyName
Component(s)
MATLAB
The text was updated successfully, but these errors were encountered:
…efinedFunction` when crafting the message to display when throwing the `arrow:proxy:ProxyNameMismatch` error (#37248)
### Rationale for this change
When constructing the message to display for with the `arrow:proxy:ProxyNameMismatch` error, we refer to an undefined variable in `arrow.internal.proxy.validate()`. This causes the function to throw a `MATLAB:UndefinedFunction` error instead of the intended one.
Here's an example of this bug:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Unrecognized function or variable 'proxyName'.
Error in arrow.internal.proxy.validate (line 26)
msg = "Proxy class name is " + proxyName + ", but expected " + expectedProxyName;
```
This was the expected error message:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Error using arrow.internal.proxy.validate
Proxy class name is arrow.array.proxy.Float64Array, but expected WrongProxyName
```
### What changes are included in this PR?
1. Fixed the typos in `arrow.internal.proxy.validate()` to resolve the `MATLAB:UndefinedFunction` error
2. Added a new test class `test/arrow/internal/proxy/tValidate.m` to test `arrow.internal.proxy.validate()`
3. Updated the error message to display when throwing an `arrow:proxy:ProxyNameMismatch` error:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Error using arrow.internal.proxy.validate
The Name property of the Proxy provided is "arrow.array.proxy.Float64Array", but
expected it to be "WrongProxyName".
```
### Are these changes tested?
Yes, added a new test class `test/arrow/internal/proxy/tValidate.m`.
### Are there any user-facing changes?
No.
* Closes: #37245
Authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
…AB:UndefinedFunction` when crafting the message to display when throwing the `arrow:proxy:ProxyNameMismatch` error (apache#37248)
### Rationale for this change
When constructing the message to display for with the `arrow:proxy:ProxyNameMismatch` error, we refer to an undefined variable in `arrow.internal.proxy.validate()`. This causes the function to throw a `MATLAB:UndefinedFunction` error instead of the intended one.
Here's an example of this bug:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Unrecognized function or variable 'proxyName'.
Error in arrow.internal.proxy.validate (line 26)
msg = "Proxy class name is " + proxyName + ", but expected " + expectedProxyName;
```
This was the expected error message:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Error using arrow.internal.proxy.validate
Proxy class name is arrow.array.proxy.Float64Array, but expected WrongProxyName
```
### What changes are included in this PR?
1. Fixed the typos in `arrow.internal.proxy.validate()` to resolve the `MATLAB:UndefinedFunction` error
2. Added a new test class `test/arrow/internal/proxy/tValidate.m` to test `arrow.internal.proxy.validate()`
3. Updated the error message to display when throwing an `arrow:proxy:ProxyNameMismatch` error:
```matlab
>> a = arrow.array([1 2 3]);
>> arrow.internal.proxy.validate(a.Proxy, "WrongProxyName")
Error using arrow.internal.proxy.validate
The Name property of the Proxy provided is "arrow.array.proxy.Float64Array", but
expected it to be "WrongProxyName".
```
### Are these changes tested?
Yes, added a new test class `test/arrow/internal/proxy/tValidate.m`.
### Are there any user-facing changes?
No.
* Closes: apache#37245
Authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
Describe the bug, including details regarding any error messages, version, and platform.
When constructing the message to display with the
arrow:proxy:ProxyNameMismatch
error, we refer to an undefined variable inarrow.internal.proxy.validate()
. This causes the function to thrown aMATLAB:UndefinedFunction
error instead of the intended one.Here's an example of this bug:
This was the expected error message:
Component(s)
MATLAB
The text was updated successfully, but these errors were encountered: