# Why am I only getting a partial string here?

**URL:** <https://discourse.julialang.org/t/why-am-i-only-getting-a-partial-string-here/108043>\
**Category:** New to Julia\
**Created:** [December 25, 2023, 10:44pm UTC](https://discourse.julialang.org/t/why-am-i-only-getting-a-partial-string-here/108043 "2023-12-25T22:44:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyjor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kyjor/32/48132_2.png) [@Kyjor](https://discourse.julialang.org/u/Kyjor)\
**Post date:** [December 25, 2023, 10:44pm UTC](https://discourse.julialang.org/t/why-am-i-only-getting-a-partial-string-here/108043/1 "2023-12-25T22:44:54Z")

</div>

Hello, I’m trying to handle errors using [SDL2](https://github.com/JuliaMultimedia/SimpleDirectMediaLayer.jl) and I’m getting some garbled text here when an error is caught and I try to print it. I’m sure there’s something simple I’m doing wrong, but I’m not super familiar with handling something like this.

```julia
using SimpleDirectMediaLayer

font = SimpleDirectMediaLayer.TTF_OpenFont("F:\\Projects\\Julia\\julGame\\src\\editor\\Editor\\src\\..\\Fonts\\Round9x13.ttf", 12)

if font == C_NULL
   println(unsafe_string(SimpleDirectMediaLayer.SDL_GetError()))
end

```

The error I get is:

> Couldn’t open F:\Projects\Julia\julGame\s

If I extend the string length to 84 (which should be the length of the entire error) it looks like this:

> F:\Projects\Julia\julGame\s�������♣����������▲�����▲����☺�������`�M5

The error itself is not an issue. I can fix it. But I would like to be able to see the entire thing when I catch it. Does anyone know what I’m doing wrong here? Thank you.

FYI, the `SDL_GetError` function looks like this:

```julia
function SDL_GetError()
    ccall((:SDL_GetError, libsdl2), Ptr{Cchar}, ())
end

```
