Changeset 929:9586f81f7870 for src/mlx


Ignore:
Timestamp:
04/27/19 12:21:05 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Better error logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/util.py

    r919 r929  
    174174def utf2unicode(text):
    175175    """Convert the given text from UTF-8 encoding to unicode."""
     176    if isinstance(text, str):
     177        if text.startswith("list indices must be"):
     178            import traceback
     179            traceback.print_exc()
     180
     181        return text
     182
    176183    try:
    177184        return str(_utf8decoder(text)[0])
    178185    except:
     186        import traceback
     187        traceback.print_exc()
    179188        try:
    180189            return str(_latin2decoder(text)[0])
Note: See TracChangeset for help on using the changeset viewer.