#1 Fix read.location bug

Birleştirildi
kjhammerle kjhammerle/master 6 yıl önce içindeki seyfahni/master işlemelerini 1 ile birleştirdi
Niklas Seyfarth 6 yıl önce olarak yorumlandı

Fixed inconsistency with read.item to throw recoverable IllegalStringLocationException instead of CodeHaltException.

Code like

@is_location_string // (String location)
push(size, location, result);
popArg();

location = popArg();

try {
    read.location(location);
    result = true;
} catch {
    result = false;
}

pushArg(result);

pop("size", "location", "result");
return();

will always return true or halt execution without this fix.

On the other hand, the same code but changed to handle items does work as expected.

@is_item_string // (String item)
push(size, item, result);
popArg();

item = popArg();

try {
    read.item(item);
    result = true;
} catch {
    result = false;
}

pushArg(result);

pop("size", "item", "result");
return();

IllegalStringLocationException should also be renamed to IllegalLocationStringException for further consistency.

Fixed inconsistency with read.item to throw recoverable IllegalStringLocationException instead of CodeHaltException. Code like @is_location_string // (String location) push(size, location, result); popArg(); location = popArg(); try { read.location(location); result = true; } catch { result = false; } pushArg(result); pop("size", "location", "result"); return(); will always return true or halt execution without this fix. On the other hand, the same code but changed to handle items does work as expected. @is_item_string // (String item) push(size, item, result); popArg(); item = popArg(); try { read.item(item); result = true; } catch { result = false; } pushArg(result); pop("size", "item", "result"); return(); IllegalStringLocationException should also be renamed to IllegalLocationStringException for further consistency.
Bu değişiklik isteği başarıyla birleştirildi!
Giriş yap bu konuşmaya katılmak için.
Etiket Yok
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.