Changeset 21144
- Timestamp:
- 08/17/16 08:36:57 (9 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 4 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/solve/WriteData.m
r20898 r21144 52 52 %Step 2: write the data itself. 53 53 if strcmpi(format,'Boolean'),% {{{ 54 if(numel(data)~=1), error(['field ' EnumToString(enum)' cannot be marshalled as it has more than one element!']); end54 if(numel(data)~=1), error(['field ' name ' cannot be marshalled as it has more than one element!']); end 55 55 56 56 %first write length of record … … 64 64 % }}} 65 65 elseif strcmpi(format,'Integer'), % {{{ 66 if(numel(data)~=1), error(['field ' EnumToString(enum)' cannot be marshalled as it has more than one element!']); end66 if(numel(data)~=1), error(['field ' name ' cannot be marshalled as it has more than one element!']); end 67 67 68 68 %first write length of record … … 76 76 % }}} 77 77 elseif strcmpi(format,'Double'), % {{{ 78 if(numel(data)~=1), error(['field ' EnumToString(enum)' cannot be marshalled as it has more than one element!']); end78 if(numel(data)~=1), error(['field ' name ' cannot be marshalled as it has more than one element!']); end 79 79 80 80 %first write length of record … … 155 155 %first write length of record 156 156 recordlength=4+4+8*s(1)*s(2)+4+4; %2 integers (32 bits) + the double matrix + code + matrix type 157 if recordlength>2^31; error(['field ' EnumToString(enum)' cannot be marshalled because it is larger than 2^31 bytes!']); end157 if recordlength>2^31; error(['field ' name ' cannot be marshalled because it is larger than 2^31 bytes!']); end 158 158 fwrite(fid,recordlength,'int'); 159 159 … … 232 232 % }}} 233 233 else % {{{ 234 error(['WriteData error message: data type: ' num2str(format) ' not supported yet! (' EnumToString(enum)')']);234 error(['WriteData error message: data type: ' num2str(format) ' not supported yet! (' name ')']); 235 235 end % }}} 236 236 end -
issm/trunk-jpl/src/m/solve/WriteData.py
r21069 r21144 64 64 if m.strcmpi(format,'Boolean'): # {{{ 65 65 # if len(data) !=1: 66 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % EnumToString(enum)[0])66 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % name[0]) 67 67 68 68 #first write length of record … … 78 78 elif m.strcmpi(format,'Integer'): # {{{ 79 79 # if len(data) !=1: 80 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % EnumToString(enum)[0])80 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % name[0]) 81 81 82 82 #first write length of record … … 92 92 elif m.strcmpi(format,'Double'): # {{{ 93 93 # if len(data) !=1: 94 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % EnumToString(enum)[0])94 # raise ValueError('field %s cannot be marshalled as it has more than one element!' % name[0]) 95 95 96 96 #first write length of record
Note:
See TracChangeset
for help on using the changeset viewer.